Created
September 23, 2023 17:59
-
-
Save adililhan/aaf7fbb9ae8060f4ba474e0a60ea5fac 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 | |
trap control_c INT | |
trap control_z TSTP | |
function control_c() { | |
echo "Interrupt detected - CTRL+C" | |
} | |
function control_z() { | |
echo "Interrupt detected - CTRL+Z... Exiting" | |
exit 0 | |
} | |
for i in `seq 1 86400`; do | |
sleep 1 | |
date | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment