Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 07 May 2011 04:23:40 +0200
From:      Rolf Nielsen <>
To:        FreeBSD <>
Subject:   Re: Comparing two lists [SOLVED (at least it looks like that)]
Message-ID:  <>
In-Reply-To: <>
References:  <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
2011-05-07 02:09, Rolf Nielsen skrev:
> Hello all,
> 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 need
> 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?
> TIA,
> Rolf

sort file1 file2 | uniq -d

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