This can be a interview question for even advanced linux users.
Here is the command : grep -o spellword file | grep wc -w
( where spellword = name of the word you want to count and file is the name of the file )
Result : You will find the result based on occurrence of specific word.
This entry was posted by Interview questions on May 2, 2014 at 12:54 am, and is filed under Linux Interview Questions. Follow any responses to this post through RSS 2.0.
You can leave a response or trackback from your own site.
Your email address will not be published. Required fields are marked *