Gentoo Archives: gentoo-user

From: Raymond Lewis Rebbeck <dystopianray@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] [OT] Question about duplicate lines in file
Date: Mon, 12 Jun 2006 17:06:00
Message-Id: 200606130224.27021.dystopianray@gmail.com
In Reply to: [gentoo-user] [OT] Question about duplicate lines in file by Teresa and Dale
1 On Tuesday, 13 June 2006 2:12, Teresa and Dale wrote:
2 > Hi folks,
3 >
4 > I have batched a bunch of servers in my hosts file to block, for ads and
5 > all that crap. I got them from several different places, some I have
6 > found too, and am sure there are dups in there, same server but pasted
7 > from several sources. I am not a programer at all and don't even really
8 > know what to search for. I would like to remove the duplicate entries
9 > and then put them in alphabetical order if I could. I would gladly then
10 > make this available if someone wanted to host it. I don't have a place
11 > to host it.
12 >
13 > Oh, there is 15,000 entries in my hosts file. O_O
14 >
15 > Could someone tell me how this is done? May even learn something here.
16 > If I can do this, I'm sure I will.
17 >
18 > Thanks.
19 >
20 > Dale
21 >
22 > :-) :-)
23
24 'uniq' and 'sort' should do what you're after, check out the man pages.
25
26 --
27 Raymond Lewis Rebbeck
28 --
29 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] [OT] Question about duplicate lines in file Teresa and Dale <teendale@×××××××××××××.com>