From: William James Date: 2005-10-06T11:11:48+09:00 Subject: Re: One-liner removing duplicate lines Damien Wyart wrote: > Hello, > > Converting from Perl to Ruby, I am trying to find an equivalent to this > Perl one-liner removing duplicate lines in a file (without sorting it at > first) : > > perl -ne'$s{$_}++||print' infile >outfile awk '!a[$0]++' infile >outfile