Mailinglist Archive: opensuse (3637 mails)

< Previous Next >
[OT SED AWK GREP] How to remove matching lines?
  • From: wilson@xxxxxxxxxxx (Jonathan Wilson)
  • Date: Wed, 02 May 2001 12:36:22 -0500
  • Message-id: <5.1.0.14.0.20010502123311.02282138@xxxxxxxxxxxxxxxx>
Howdy,

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:

abc.com
asdf.net
asdf.net
qwerty.org
sdfg.net
sdfg.net

I want to get rid of all duplicates, such as "asdf.net" and "sdfg.net" in this example.

can this be done?

----------------------------------------------------
Jonathan Wilson
System Administrator

Cedar Creek Software http://www.cedarcreeksoftware.com
Central Texas IT http://www.centraltexasit.com


< Previous Next >