Qualcomm Interview Question

Read a file in unix and count for the particular word in file using single command script.

Interview Answer

Anonymous

Feb 18, 2010

At that time I didnt know about UNIX commands. Ans. use the grep command to search and pipe the result and pass it to the wc command. grep your_word filename | wc -l