Created
February 8, 2021 14:41
-
-
Save josepsmartinez/93ce359d5118b1713a5bff5760e63e4a to your computer and use it in GitHub Desktop.
Trapping INT signal on bash script
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 'echo "Exiting due to keyboard interrupt."; exit' INT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment