Wednesday, December 9, 2009

Count occurrence of words in a file

  • grep -c "myword" < file  
  • cat file | grep -c "myword"

No comments:

Post a Comment