Date: Tue, 05 May 2009 21:19:56 +0100 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: Polytropon <freebsd@edvax.de> Cc: =?UTF-8?B?WWF2dXogTWHFn2xhaw==?= <yavuz.maslak@netiletisim.net>, freebsd-questions@freebsd.org Subject: Re: How can I extract differences between 2 folders ? Message-ID: <4A009F6C.80009@infracaninophile.co.uk> In-Reply-To: <20090505215611.c074b710.freebsd@edvax.de> References: <D140D3378E824AC1995B6A6503732D69@desktop2002> <20090505165621inode@frozen-zone.org> <4D71445373A74C088A3CDBF3868278A4@desktop2002> <20090505215611.c074b710.freebsd@edvax.de>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig73426746DA36369EF88EE6DD Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Polytropon wrote: > On Tue, 5 May 2009 21:35:22 +0300, Yavuz Ma=C5=9Flak <yavuz.maslak@neti= letisim.net> wrote: >> I wish diff or another command not to display same values which are in= =20 >> different lines. >=20 > 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 line= s that are only in file1, and the second of lines that are only in file2. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW --------------enig73426746DA36369EF88EE6DD Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEAREIAAYFAkoAn3IACgkQ8Mjk52CukIwUnACeITunf8MdVUhK0Sdl/sKRYdAq gjMAn27ZV40HW9WTB3ak2KOB2cNQBzse =VwX8 -----END PGP SIGNATURE----- --------------enig73426746DA36369EF88EE6DD--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4A009F6C.80009>