Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 07 May 2011 07:38:09 +0100
From:      Matthew Seaman <>
Subject:   Re: Comparing two lists
Message-ID:  <>
In-Reply-To: <>
References:  <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On 07/05/2011 01:09, Rolf Nielsen wrote:
> I have two text files, quite extensive ones. They have some lines in
> common and some lines are unique to one of the files. The lines that do=

> exist in both files are not necessarily in the same location. Now I nee=
> to compare the files and output a list of lines that exist in both
> files. Is there a simple way to do this? diff? awk? sed? cmp? Or a
> combination of two or more of them?


Which does exactly what you want -- showing lines that belong to one
file or another, and lines that belong to both.  The limitation is that
the files need to be sorted before being compared.



Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                  Flat 3
PGP:     Ramsgate
JID:               Kent, CT11 9PW

Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

Version: GnuPG/MacGPG2 v2.0.16 (Darwin)
Comment: Using GnuPG with Mozilla -



Want to link to this message? Use this URL: <>