Skip to content

Instantly share code, notes, and snippets.

@buxtonpaul
Created January 9, 2018 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save buxtonpaul/129386a9206448b977c1806ebd981462 to your computer and use it in GitHub Desktop.
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
#!/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