Re: Diff: obtain only the different lines of the newest file

Henrik Carlqvist <[email protected]> Fri, 13 Aug 2010 07:11:01 +0200
Newsgroups gmane.comp.gnu.utils
Organization SunSITE.dk - Supporting Open source
Message-ID <[email protected]>
Kimahri Ronso <[email protected]> wrote:
> I have 2 files containing almost the same information with around 70.000
> records.
> 
> What I would like to know is if there is a possibility to obtain only the
> different lines from the second file without anything else.
> 
> I just need to know the content of the changed lines in the newest file.

What about:

diff file1 file2 | grep -e "^>"

Or, maybe, if you don't like the preceeding "> ":

diff file1 file2 | grep -e "^>" | colrm 1 2

regards Henrik
-- 
The address in the header is only to prevent spam. My real address is:
hc123(at)poolhem.se Examples of addresses which go to spammers:
root@localhost postmaster@localhost