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

Re: [OCLUG-Tech] Question about grep

No as I thought that uniq worked only with one file.

One mistake in my post: I wrote back slashes instead of slashes.
Thanks!

Charles

afields [ at ] ncf [ dot ] ca wrote:
Did you try uniq ?
- afields

------Original Message------
From: Charles Nadeau
Sender: linux-bounces [ at ] lists [ dot ] oclug [ dot ] on [ dot ] ca
To: linux [ at ] lists [ dot ] oclug [ dot ] on [ dot ] ca
ReplyTo: charles [ dot ] nadeau [ at ] gmail [ dot ] com
Subject: [OCLUG-Tech] Question about grep
Sent: Oct 28, 2008 17:38

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
_______________________________________________
Linux mailing list
Linux [ at ] lists [ dot ] oclug [ dot ] on [ dot ] ca
http://oclug.on.ca/mailman/listinfo/linux


Sent from my BlackBerry device on the Rogers Wireless Network