The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 07-28-2008
danielsbrewer danielsbrewer is offline
Registered User
  
 

Join Date: Jul 2008
Posts: 1
Monitor log file and execute command

I would like to monitor a log file using a shell script and as soon as a line with a certain string in it appears I would like to run a program. I have been playing around with doing this using tail -f, but cannot get it to work. I found something similar here:
Help on scripting using tail

The restriction on this is that the monitoring script needs to be in sh or ash as I am using busybox.

Any hints? Many thanks