I\'m using grep to generate a list of files I need to move:
grep -L -r \'Subject: \\[SPAM\\]\' .
How can I pass this list to the mv command
Work perfect fo me :
move files who contain the text withe the word MYSTRINGTOSEARCH to directory MYDIR.
find . -type f -exec grep -il 'MYSTRINGTOSEARCH' {} \; -exec mv {} MYDIR/ \;
I hope this helps