Find the answer to your Linux question:
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 ...
  1. #1
    Just Joined!
    Join Date
    Feb 2008
    Posts
    2

    Question 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

  2. #2
    Linux 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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...