Last active
January 22, 2023 14:41
-
-
Save nishanths/6f00820e408cb18c361cfe4a1e5b79f6 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
trap 'echo hello' INT | |
read | |
# Output: | |
# | |
# % bash trap_basic | |
# ^Chello | |
# ^Chello | |
# ^Chello | |
# ^Chello | |
# ^Chello |
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
trap 'echo hello' INT | |
trap '' INT | |
read | |
# Output: | |
# | |
# % bash trap_null | |
# ^C^C^C^C^C^C^C |
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
trap 'echo hello' INT | |
trap - INT | |
read | |
# Output: | |
# | |
# % bash trap_reset | |
# ^C | |
# % |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment