How can I extract differences between 2 folders ?
m.seaman at infracaninophile.co.uk
Tue May 5 20:20:16 UTC 2009
> On Tue, 5 May 2009 21:35:22 +0300, Yavuz Maşlak <yavuz.maslak at netiletisim.net> wrote:
>> I wish diff or another command not to display same values which are in
>> different lines.
> You could first run the files through sort, then diff them.
Rather than diff(1), perhaps comm(1) is a better choice. You still need to
sort the input files though:
% sort file1 > file1.sorted
% sort file2 > file2.sorted
% comm -3 file1.sorted file2.sorted
This will print two columns of output. The first column consists of lines
that are only in file1, and the second of lines that are only in file2.
Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
Kent, CT11 9PW
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 259 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20090505/57d342ba/signature-0001.pgp
More information about the freebsd-questions