Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: UNIX: remove duplicate lines

RE: UNIX: remove duplicate lines

From: Stephen Andert <StephenAndert_at_firsthealth.com>
Date: Wed, 03 Jan 2001 16:00:25 -0700
Message-Id: <10730.125650@fatcity.com>


Any reason why you cant sort? If not,=20

cat file_name | sort -u

should give you unique items.

HTH Stephen=20

>>> MohanR_at_STARS-SMI.com 01/03 3:21 PM >>>
"HP" -=20

A PERL script would do it in about 3 lines ( excluding wrappers, etc. ) Of course, TIMTOWTDI. (ask Jared!)=20

Hell, if it's under several hundred thousand lines, load it via=20 sqlldr into a table, and declare the text as a primary key, enable the key, stash the violations by ROWID into another table, delete=20 as necessary, and spool it back out to a file.=20

-----Original Message-----
Sent: Wednesday, January 03, 2001 4:56 PM To: Multiple recipients of list ORACLE-L

does anyone know of a way i can remove duplicate lines from a file.

I can use the sort -u command but is there any other way to do it without sorting the file?
--=20
Please see the official ORACLE-L FAQ: http://www.orafaq.com=20 --=20
Author: hp
  INET: hp_at_lechateau.ca=20

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Wed Jan 03 2001 - 17:00:25 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US