Re: Comparing two lists

2011-05-07 Thread Matthew Seaman
On 07/05/2011 01:09, Rolf Nielsen wrote: I have two text files, quite extensive ones. They have some lines in common and some lines are unique to one of the files. The lines that do exist in both files are not necessarily in the same location. Now I need to compare the files and output a list

Re: Comparing two lists [SOLVED (at least it looks like that)]

2011-05-07 Thread Rolf Nielsen
2011-05-07 05:11, Yuri Pankov skrev: On Sat, May 07, 2011 at 04:23:40AM +0200, Rolf Nielsen wrote: 2011-05-07 02:09, Rolf Nielsen skrev: Hello all, I have two text files, quite extensive ones. They have some lines in common and some lines are unique to one of the files. The lines that do

Re: Comparing two lists [SOLVED (at least it looks like that)]

2011-05-07 Thread Rolf Nielsen
2011-05-07 05:16, b. f. skrev: 2011-05-07 02:09, Rolf Nielsen skrev: Hello all, I have two text files, quite extensive ones. They have some lines in common and some lines are unique to one of the files. The lines that do exist in both files are not necessarily in the same location. Now I need

Re: Comparing two lists

2011-05-07 Thread Rolf Nielsen
2011-05-07 07:28, Robert Bonomi skrev: From listrea...@lazlarlyricon.com Fri May 6 20:14:09 2011 Date: Sat, 07 May 2011 03:13:39 +0200 From: Rolf Nielsenlistrea...@lazlarlyricon.com To: Robert Bonomibon...@mail.r-bonomi.com CC: freebsd-questions@freebsd.org Subject: Re: Comparing two lists

Re: Comparing two lists

2011-05-07 Thread Chad Perrin
On Sat, May 07, 2011 at 02:09:26AM +0200, Rolf Nielsen wrote: I have two text files, quite extensive ones. They have some lines in common and some lines are unique to one of the files. The lines that do exist in both files are not necessarily in the same location. Now I need to compare

Re: Comparing two lists

2011-05-07 Thread Chip Camden
Quoth Chad Perrin on Saturday, 07 May 2011: On Sat, May 07, 2011 at 02:09:26AM +0200, Rolf Nielsen wrote: I have two text files, quite extensive ones. They have some lines in common and some lines are unique to one of the files. The lines that do exist in both files are not necessarily

Comparing two lists

2011-05-06 Thread Rolf Nielsen
Hello all, I have two text files, quite extensive ones. They have some lines in common and some lines are unique to one of the files. The lines that do exist in both files are not necessarily in the same location. Now I need to compare the files and output a list of lines that exist in both

Re: Comparing two lists

2011-05-06 Thread Polytropon
On Sat, 07 May 2011 02:09:26 +0200, Rolf Nielsen listrea...@lazlarlyricon.com wrote: Hello all, I have two text files, quite extensive ones. They have some lines in common and some lines are unique to one of the files. The lines that do exist in both files are not necessarily in the same

Re: Comparing two lists

2011-05-06 Thread Rolf Nielsen
2011-05-07 02:33, Polytropon skrev: On Sat, 07 May 2011 02:09:26 +0200, Rolf Nielsenlistrea...@lazlarlyricon.com wrote: Hello all, I have two text files, quite extensive ones. They have some lines in common and some lines are unique to one of the files. The lines that do exist in both files

Re: Comparing two lists

2011-05-06 Thread Robert Bonomi
From owner-freebsd-questi...@freebsd.org Fri May 6 19:27:54 2011 Date: Sat, 07 May 2011 02:09:26 +0200 From: Rolf Nielsen listrea...@lazlarlyricon.com To: FreeBSD freebsd-questions@freebsd.org Subject: Comparing two lists Hello all, I have two text files, quite extensive ones. They have

Re: Comparing two lists

2011-05-06 Thread Rolf Nielsen
2011-05-07 02:54, Robert Bonomi skrev: From owner-freebsd-questi...@freebsd.org Fri May 6 19:27:54 2011 Date: Sat, 07 May 2011 02:09:26 +0200 From: Rolf Nielsenlistrea...@lazlarlyricon.com To: FreeBSDfreebsd-questions@freebsd.org Subject: Comparing two lists Hello all, I have two text files

Re: Comparing two lists [SOLVED (at least it looks like that)]

2011-05-06 Thread Rolf Nielsen
2011-05-07 02:09, Rolf Nielsen skrev: Hello all, I have two text files, quite extensive ones. They have some lines in common and some lines are unique to one of the files. The lines that do exist in both files are not necessarily in the same location. Now I need to compare the files and output

Re: Comparing two lists

2011-05-06 Thread Eitan Adler
They have some lines in common and some lines are unique to one of the files. Use comm whenever you are dealing with set operations (in your case the intersection operation): http://www.catonmat.net/blog/set-operations-in-unix-shell -- Eitan Adler

Re: Comparing two lists

2011-05-06 Thread John Levine
Some 10,000 to 20,000 lines each. I do need only the common lines. Order is not essential, but would make life easier. I've tried a little with uniq, as suggested by Polyptron, but I guess 3am is not quite the right time to do these things. Anyway, thanks. sort -u file1 sorted-file1 sort -u

Re: Comparing two lists [SOLVED (at least it looks like that)]

2011-05-06 Thread Yuri Pankov
On Sat, May 07, 2011 at 04:23:40AM +0200, Rolf Nielsen wrote: 2011-05-07 02:09, Rolf Nielsen skrev: Hello all, I have two text files, quite extensive ones. They have some lines in common and some lines are unique to one of the files. The lines that do exist in both files are not

Re: Comparing two lists [SOLVED (at least it looks like that)]

2011-05-06 Thread b. f.
2011-05-07 02:09, Rolf Nielsen skrev: Hello all, I have two text files, quite extensive ones. They have some lines in common and some lines are unique to one of the files. The lines that do exist in both files are not necessarily in the same location. Now I need to compare the files