[Gllug] sort & uniq
Martin A. Brooks
martin at clues.ltd.uk
Tue Aug 5 11:11:53 UTC 2003
On Tue, 2003-08-05 at 11:38, Daniel Andersson wrote:
> the file i'm 'playing' with is
> http://daniel.septum.org/testfile.txt
perl -e 'open IN,"testfile.txt"; while (<IN>){chomp; s/\ //g;
$hash{$_}++;} foreach $key (sort keys %hash){print "$key:
$hash{$key}\n";}'
Regards
--
Martin A. Brooks, Clues Ltd
http://www.clues.ltd.uk/
--
Gllug mailing list - Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug
More information about the GLLUG
mailing list