X Marks the Scot - An on-line community of kilt wearers.

   X Marks Partners - (Go to the Partners Dedicated Forums )
USA Kilts website Celtic Croft website Celtic Corner website Houston Kiltmakers

User Tag List

Results 1 to 10 of 17

Threaded View

  1. #8
    Join Date
    20th February 06
    Location
    San Francisco Bay Area
    Posts
    1,078
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote 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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

» Log in

User Name:

Password:

Not a member yet?
Register Now!
Powered by vBadvanced CMPS v4.2.0