Created
August 13, 2018 23:55
-
-
Save chaspy/2d8889efec0f4592153ad507c4004baf to your computer and use it in GitHub Desktop.
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/bash | |
touch /tmp/trap.$$ | |
trap 'echo "trapped"; rm /tmp/trap.$$; exit 1' 2 | |
while : | |
do | |
echo "loop" | |
sleep 10 | |
done | |
rm /tmp/trap.$$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment