Created
January 9, 2018 13:56
-
-
Save buxtonpaul/129386a9206448b977c1806ebd981462 to your computer and use it in GitHub Desktop.
Stay alive bash script. Runs until it sees a file ~/aah.txt, checking every 5 secs
This file contains hidden or 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/bash | |
# loop checking for a file, if the file exists exit | |
for (( ; ; )) | |
do | |
if [ -f ~/aah.txt ]; then | |
#echo "File Found!" | |
exit | |
fi | |
sleep 5 | |
#echo "Staying Alive" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment