Counting words in text file


/ Published in: Bash
Save to your folder(s)

Find & count how many words in some file


Copy this code and paste it in your HTML
  1. #!/bin/sh
  2.  
  3. tr -sc 'A-Za-z' '\012' < filename.file | sort | uniq -c

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.