Jarvis

To help you out with small things.

Thursday, 14 November 2013

Find count of each word in a file in linux command line

tr -s [:space:] \\n < your_filename | sort | uniq --count | sort -rn | head -n 50

This shows the top 50 words in your file in a sorted manner

Posted by Jijo at 06:56
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Newer Post Older Post Home
profile for Jijo at Stack Overflow, Q&A for professional and enthusiast programmers

Total Pageviews

Pages

  • Home

Blog Archive

  • ►  2020 (2)
    • ►  April (1)
    • ►  March (1)
  • ►  2019 (2)
    • ►  April (2)
  • ►  2018 (2)
    • ►  February (2)
  • ►  2017 (3)
    • ►  July (1)
    • ►  June (1)
    • ►  March (1)
  • ►  2015 (3)
    • ►  June (1)
    • ►  May (2)
  • ►  2014 (14)
    • ►  November (3)
    • ►  October (3)
    • ►  July (2)
    • ►  May (2)
    • ►  January (4)
  • ▼  2013 (20)
    • ►  December (5)
    • ▼  November (4)
      • Password of cloudera-scm user
      • Enable logging feature for soap webserivce to get ...
      • Find count of each word in a file in linux command...
      • Exception in thread "main" java.lang.NoClassDefFou...
    • ►  October (11)

About Me

Jijo
View my complete profile
Simple theme. Powered by Blogger.