I've got the following code:
cd /home/pi/.attract/romlists; for file in *.tag ; do grep -v -F 'Arcade Snooker [AGA]' $file > $file1.tmp && mv -f $file1.tmp $file; done
This works well to remove the fixed string "Arcade Snooker [AGA]" from a file such as "Amiga.tag". However, it does not remove the string from "Atari 800.tag" or from any other file that has a "space" in its name. The result for "Atari 800.tag" is the following error:
grep: Atari: No such file or directory
grep: 800.tag: No such file or directory
What changes do I need to make to the code please to get it to remove "Arcade Snooker [AGA]" from "Atari 800.tag" and from other such files containing spaces in their names?
I would prefer to have one line of code only please as I have it now.
Thanks.