/LinuxScn2c.ksh Secret
Last active
August 29, 2015 14:27
Write a script which will check for a given file in every 60 seconds in a given directory, if find, send us a mail else keep running. We do not want to set this script in crontab.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/ksh | |
#================================================================================================================================= | |
# Write a script which will check for a given file in every 60 seconds in a given directory, | |
#if find, send us a mail else keep running. We do not want to set this script in crontab. | |
# Author - Atul Singh | |
# Date - Aug 23, 2015 | |
# Scenario - http://www.datagenx.net/2015/08/linux-shell-script-scenario-2.html | |
# www.DataGenX.net | |
#================================================================================================================================= | |
while : | |
do | |
sleep 60 & pid=$! | |
some_command arg1 arg2 | |
wait $pid | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment