Legal:

$ time awk '{ if (!visto[$0]) { print; visto[$0] = 1; } }' teste >t1
real    0m0.319s 

$ time awk '!($0 in a) {a[$0];print}' teste >t2
real    0m0.310s

$ time awk '!a[$0]++' teste >t3
real    0m0.306s

$ diff3 t1 t2 t3
$ 

> -----Original Message-----
> From: Sérgio
> 
> Acho que o awk resolve, tenta assim:
> 
> awk '!($0 in a) {a[$0];print}' file
>  
> ou assim
> 
> awk '!a[$0]++' file
> 
> visita este link: 
> http://linuxdicas.wikispaces.com/awk
> 

Responder a