On Thursday 19 August 2004 07:43 am, Todd Slater wrote:

> I did that in step 1. I suppose you could also just use the -i switch to
> uniq to ignore case, so we might end up with
>
> tr ' \011' '\012\012' < text.txt | tr -d [:punct:] | sort | uniq -ic

That's a new one for me - never noticed the -i in uniq.  Thanks.

> Now, how to sort the results of that so it's as we would expect, i.e. 1,
> 2, 3, 4, etc. instead of the computer way?

Toss a 'sort -n' on the end of the pipe, 'sort -nr' if you want the high count 
to show up at the top of the list.  I still have the old habit (from glass 
tty days) of letting the high value stuff show at the bottom of the output 
and tend to use the first form (and automatically add -r to a lot of ls() 
commands).



____________________________________________________
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