Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: comparing 2 files and creating third file with uncommon content

by Bloodnok (Vicar)
on Jun 18, 2014 at 16:11 UTC ( #1090318=note: print w/replies, xml ) Need Help??


in reply to comparing 2 files and creating third file with uncommon content

Whilst it may have been left as an exercise for the interested reader, in the pursuit of an expeditious result and as ArunBear has already suggested, there are readily available command line tools (on *NIX & Cygwin) e.g. join - something like
$ sort File_1 > File_1.sorted $ sort File_2 | join File_1.sorted - -v1 -v2 > file.diff

A user level that continues to overstate my experience :-))
  • Comment on Re: comparing 2 files and creating third file with uncommon content
  • Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1090318]
help
Chatterbox?
[hippo]: See also Getting Started with Perl for some gentle introductory tutorials.
[thao4]: I don't see where I can post my question. I am french so not good in English
[erix]: go to the bottom of this page: Seekers of Perl Wisdom

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2018-02-21 09:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When it is dark outside I am happiest to see ...














    Results (276 votes). Check out past polls.

    Notices?