The UNIX and Linux Forums  

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



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Can we trigger an shell script on an event cv_pan UNIX for Dummies Questions & Answers 8 10-17-2008 09:24 AM
trigger a script based on the run status of another scipt Athena Shell Programming and Scripting 1 10-02-2008 03:11 PM
Trigger Shell Script from Current Script mmignot Shell Programming and Scripting 1 11-06-2006 02:13 PM
Check if trigger Script is running mgirinath Shell Programming and Scripting 9 04-05-2006 02:07 AM
Shell script call from a DB trigger rahulrathod Shell Programming and Scripting 1 12-15-2005 07:28 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 01-21-2009
nishigupta nishigupta is offline
Registered User
  
 

Join Date: Jan 2009
Posts: 1
Exclamation How to trigger a script based on another log file.

I need to execute my script as soon as one log file arrives.
This log file is named as logyymmdd. I need to add trigger to my script based on this logfile.
Please guide.
  #2 (permalink)  
Old 01-21-2009
funksen funksen is offline Forum Advisor  
Registered User
  
 

Join Date: Nov 2006
Location: Austria/Vienna
Posts: 431
you could run a cronjob every minute, which starts with


Code:
if  [ ! -f log$(date +%y%m%d) ] 
then exit 0
#or echo file not found ; exit 1
fi
#enter you script here:

Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 11:29 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0