Rodolfo Medina wrote:

> Hi.
> 
> Does it exist a linux command (or a sequence of commands)
> that looks into a file
> and delete one line if there are two equal?
> 
> Thanks,
> Rodolfo
If you don't mind having your original file sorted, then
cat input_file | sort | uniq > result_file would give you what you want (in
result_file).

then you could add && rm -f input_file && mv result_file input_file to make
the switch as in

cat input_file | sort | uniq > result_file && rm -f input_file && mv
result_file input_file 

(the rm might be unnecessary)
-- 
/Björn
-------------------------------------------------------------------
http://lundin.homelinux.net
Registered Linux User No. 267342 <http://counter.li.org>


____________________________________________________
Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com
____________________________________________________

Reply via email to