Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automation of script!

Status
Not open for further replies.

Rvir

Programmer
Joined
May 16, 2007
Messages
18
Location
US
I've to write a script which has to run as soon as a log file is generated from another script. Some body can tell me how do i proceed or is there any function with in unix which can help me do this.
 
it can sit and wait for it. Something like
Code:
#!/bin/ksh
while ! [ -f /path/to/logfile ]
do
  sleep 60
done
#now the logfile exists
process_logfile

Ceci n'est pas une signature
Columb Healy
 
Thank you !
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top