[Linux-disciples] Converting an array to a hash
Stephen R Laniel
steve at laniels.org
Wed Oct 6 13:35:12 EDT 2004
On Wed, Oct 06, 2004 at 01:31:03PM -0400, Adam Rosi-Kessel wrote:
> You could, of course, also run the command line:
>
> find . -type f -exec cat '{}' ';' | tr " " "\n" | sort | uniq -c | sort -nr
Quite right; I hadn't thought about that, but it's pretty
cool.
The command line would have to be modified so that we're not
catching words with numbers, or other such non-English
words. It would also have to convert everything to lowercase
so that 'the' doesn't count as a different word from 'The'.
After all that is said and done, and after appropriate error
checking, I wonder whether the bash trick would be any
shorter?
--
``I am all about the delivery of *justice* to
parking, people. That is all.''
-Jon Sung, 27 September 2004
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.bostoncoop.net/pipermail/linux-disciples/attachments/20041006/acb4a3d9/attachment.pgp
More information about the Linux-disciples
mailing list