The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 06-03-2008
appu1987 appu1987 is offline
Registered User
  
 

Join Date: Jun 2008
Posts: 6
Help grep and awk

I need to write a small shell script which does the following :

I have a file : root/var/log/ocmp/ocmpclient.log

This is a log file which is continuosly getting updated . I have to keep looking into this file all the time. I have to look for four keywords, "File Detected", File Sending", "File Recieved", "Disconnecting"

Now whenever i find one of these keywords i have to print them on the screen, this process continues till the computer shuts down.

Pls help me, I am supposed to use grep and awk

Help me its urgent.