Count Words With The wc Command
For example, if you have written a file "report" and type in "wc report" at the command line, it will give you three numbers, the first one being the number of lines in the file "report", the second one the number words, and the last one the number of characters. The nice thing about the wc command is that it is actually easy to remember: wc stands for "word count".


hi, I hv little knowledge on scripting. But I would like to know if I want to write a script that when execute it will show number of time the word occur in a file. eg. a word “BOOKS”. What should the script look like?