home | list info | list archive | date index | thread index

[OCLUG-Tech] Question about grep

Hi,

I am trying to remove all the lines of file2 that are in file1.
In theory, grep -F -v -f file1 file2 should do the trick.
The two files contain file names with their full path. Some parts of the paths contain spaces like:

\a\b\c or d\picture1.jpg
\a\b\cord\picture2.jpg
\a\z\c or d\picture3.jpg
\a\bc\c or d\picture4.jpg
\a\bhhj\cor d\picture5.jpg

Is it possible that the presence of spaces and slashes makes grep fail (I also tried fgrep and egrep and I got the same results)? Should I escape the slashes in my file paths? What about he spaces? Should I use sed instead of grep?

Thanks!

Charles Nadeau