X Marks the Scot - An on-line community of kilt wearers.
-
8th March 06, 07:28 PM
#8
![Quote](http://www.xmarksthescot.com/forum/images/misc/quote_icon.png) Originally Posted by clancelt
I don't know how the windows guys do it, but the Unix guys would do something like this:
"cat thedocument.txt | grep -c theword"
this would give you the count of how many times the text "theword" shows up.
I could write a script that would set up an array of the unique words in the document and then run that with each word variable then dump the results to a text file.
I'm sure the Windows guys have something that will do the same thing with one or two clicks. :rolleyes:
Even better would be:
tr -sc 'A-Za-z' '\012' <file.txt | sort | uniq -ci | sort -rn | more
Last edited by walkerk; 8th March 06 at 07:31 PM.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|
Bookmarks