Scripting question

Jeffrey Goldberg jeffrey at goldmark.org
Thu Sep 13 13:10:11 PDT 2007


On Sep 13, 2007, at 2:38 PM, Kurt Buff wrote:

>> Instead of grep -v take a look at comm.

> Interesting! I just looked at the man page, and while I don't think it
> it's going to be directly useful (or I'm just not reading the page
> correctly), it's a new utility to me - I'll keep it in mind for other
> things.

Maybe I haven't understood what you are after.

If you want to get lines that exist in either file1 or file2 but not  
both (and if the files are already sorted) then

   comm -3 file1  file2

will do that.

-j




-- 
Jeffrey Goldberg                        http://www.goldmark.org/jeff/



More information about the freebsd-questions mailing list