Gentoo Archives: gentoo-user

From: Neil Bothwick <neil@××××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] [OT] Question about duplicate lines in file
Date: Mon, 12 Jun 2006 18:01:32
Message-Id: 20060612183752.543afeaf@krikkit.digimed.co.uk
In Reply to: Re: [gentoo-user] [OT] Question about duplicate lines in file by Teresa and Dale
1 On Mon, 12 Jun 2006 12:19:46 -0500, Teresa and Dale wrote:
2
3 > uniq -u /home/dale/Desktop/hosts /home/dale/Desktop/hostsort
4
5 uniq only removes consecutive duplicate line, you need to use sort first
6
7 sort file | uniq >newfile
8
9 or, possibly, depending on the format of your file
10
11 sort -u file >newfile
12
13
14 --
15 Neil Bothwick
16
17 Few women admit their age. Few men act theirs.

Attachments

File name MIME type
signature.asc application/pgp-signature