Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Comparison Of Files

by weingart (Acolyte)
on Dec 05, 2000 at 23:31 UTC ( [id://45063]=note: print w/replies, xml ) Need Help??


in reply to Comparison Of Files

If they are already sorted,

diff -u file1 file2 | sed -e '/^^+/d' -e 's/^+//'

will do the job handily... Of course, using an oldie tool will do the job even easier, but only if the files are sorted first:

comm -2 file1 file2

--Toby.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://45063]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2025-01-25 06:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which URL do you most often use to access this site?












    Results (70 votes). Check out past polls.