By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,987 Members | 1,607 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,987 IT Pros & Developers. It's quick & easy.

Need Help with Bash Script

P: 1
Hi,

I've created a bash script which is executed every 5 minutes through a cron. The script checks if a trigger variable has been set to execute certain commands. If it is the commands are executed otherwise it skips the commands. However, since this script is executed every 5 minutes the trigger variable is reset upon each time the script is executed. Can anyone recommend a method which I can use to keep the value of the trigger variable outside the script? I was thinking of using an environment variable but I can't seem to get that to work.

Your help is greatly appreciated.
Thanks
Jul 11 '07 #1
Share this Question
Share on Google+
1 Reply


Motoma
Expert 2.5K+
P: 3,235
Hi,

I've created a bash script which is executed every 5 minutes through a cron. The script checks if a trigger variable has been set to execute certain commands. If it is the commands are executed otherwise it skips the commands. However, since this script is executed every 5 minutes the trigger variable is reset upon each time the script is executed. Can anyone recommend a method which I can use to keep the value of the trigger variable outside the script? I was thinking of using an environment variable but I can't seem to get that to work.

Your help is greatly appreciated.
Thanks
Hi, I'm having a little difficulty understanding what you are trying to do, could you please post a simple test case?
Jul 17 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.