Skip to content

Instantly share code, notes, and snippets.

@haridas
Created May 24, 2018 06:44
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 haridas/1dfc595d2ba2a6dc3e5b3a399bbff47f to your computer and use it in GitHub Desktop.
Save haridas/1dfc595d2ba2a6dc3e5b3a399bbff47f to your computer and use it in GitHub Desktop.
END=""
trap 'increment && END=1' 2
increment() {
ls /
echo "Cleaned up"
}
while [ "$END" == '' ]; do
sleep 5
echo "waiting.."
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment