[Chugalug] tag cloud a mailing list

Matt Keys mk6032 at yahoo.com
Sat Dec 15 09:58:49 UTC 2012


cat infile | tr -cs "[:alnum:]" "\n" | sort | uniq -c | sort -rn


On 12/14/2012 06:04 PM, Dan Lyke wrote:
> Someone made a comment about word clouds on Facebook yesterday, and
> being the smartass that I am I couldn't resist:
>
> perl -e 'while (<>) { $c{$_}++ for (split /\W+/); } print map {$_ ?
> "$_ => $c{$_}\n" : ""} (sort { $c{$b} <=> $c{$a} } keys %c)'
>
> Takes text as STDIN, Outputs "word => occurrences", one per line, in
> descending occurrences order.
> _______________________________________________
> Chugalug mailing list
> Chugalug at chugalug.org
> http://chugalug.org/cgi-bin/mailman/listinfo/chugalug
>



More information about the Chugalug mailing list