[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: sort



On Tue, May 28, 2002 at 04:06:33PM -0300, O Senhor wrote:
>   How can i delete equal lines from a file, without sort it?
>   If i use sort -u, the command clean up the repeat lines, but sort my
> file (ascendent). I don't want this. I need my file in original form.

It's fairly trivial to determine if adjacent lines are identical but if
they are scattered throughout the file then it becomes much more
difficult. That's why it's advantageous to sort the file first.

Have you looked at 'uniq'?

-- 
"Compromise is always wrong when it means sacrificing a principle."
		-- John Perkins 1993 _Malice in Wonderland_ pg 146
    Rick Pasotto    rickp@telocity.com    http://www.niof.net


-- 
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: