help-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Henrik Carlqvist
Subject: Re: Diff: obtain only the different lines of the newest file
Date: Wed, 08 Dec 2010 15:04:02 -0000
User-agent: Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.)

Kimahri Ronso <kronso@gmail.com> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]