Mailinglist Archive: opensuse (3637 mails)

< Previous Next >
Re: [OT SED AWK GREP] How to remove matching lines?
  • From: Dave Jones <davej@xxxxxxx>
  • Date: Wed, 2 May 2001 19:28:39 +0200 (CEST)
  • Message-id: <Pine.LNX.4.30.0105021926560.10218-100000@xxxxxxxxxxxxxxx>
On Wed, 2 May 2001, Jonathan Wilson wrote:

> I have a file that's a list of hostnames from 2 different apache
> servers. I'd like to get rid of all duplicates with sed or awk. for
> example after combining the two lists and running sort on it I get the
> following:
> I want to get rid of all duplicates, such as "" and "" in this example.

uniq filename
Or, if you are running sort on the file anyway,
use sort -u filename.



< Previous Next >