Software Engineering :: Operating Systems :: Linux :: Command :: trap(1p)
⪼ Made with 💜 by Polyglot.
trap "echo The script is terminated; exit" SIGINT
while true
do
echo Test
sleep 1
done
- Bash trap Command Explained
- Catch SIGINT in bash, handle AND ignore
- trap
- Using Bash traps in your scripts
- Bash script to mirror from one git repo to another git repo