Results 1 to 3 of 3

Thread: unique wors

  1. #1
    Join Date
    Mar 2011
    Posts
    2

    Unanswered: unique wors

    Hello. I try to count the unique words in files in one folder and its subfolders.
    I tried something like this :

    ls| find -d | cat | tr "\ " "\n"| uniq -u | wc -l

    but cat writes only the names of the files and not the text which is in them. :-S
    Any idea, how to make it?

  2. #2
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    try: "ls | find ... | xargs cat | ..."
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

  3. #3
    Join Date
    Mar 2011
    Posts
    2
    Thank you, this was very helpful.

Posting Permissions

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