Results 1 to 2 of 2
Hi all,
I have one question to all of our group to help me.
I want to use a script for the following situation.
There are files with extension .log ...
- 02-22-2008 #1Just Joined!
- Join Date
- Feb 2008
- Posts
- 2
count the word in a file by searching file with .log extension in all directory
Hi all,
I have one question to all of our group to help me.
I want to use a script for the following situation.
There are files with extension .log in various directories, i need to get the files with .log extension and i have read the files to search for the word "pass" and atlast i need to count the number of occurence of the word "pass"
i need a script to do the task. Do reply this post as i am eagerly waiting for your solution.
Thanks,
mohan
- 02-22-2008 #2Linux Enthusiast
- Join Date
- Aug 2006
- Posts
- 631
To find those files you can use the find command and use grep to count the pattern.
Check the manpages of those commands and try to solve this problem yourself.
If you have problems with it don't hestitate to ask more questions.
Regards


Reply With Quote