for ARC in `grep -l 'TCO' *.ARC`; do PDF=`basename -s ARC "$ARC"`PDF; if [ -f "$PDF" ]; then echo "Both $ARC and $PDF exist, do the move"; fi; done