Separated further readings from sources

This commit is contained in:
Michele Cereda
2022-05-01 11:03:32 +02:00
parent 35cce39ed7
commit 10cac45a7d
24 changed files with 86 additions and 45 deletions

View File

@@ -2,8 +2,26 @@
## TL;DR
```shell
# Run a command or function on exit, kill or error.
trap "rm -f $tempfile" EXIT SIGTERM ERR
trap function-name EXIT SIGTERM ERR
# Disable CTRL-C
trap "" SIGINT
# Re-enable CTRL-C
trap - SIGINT
```
## Further readings
- [Trap]
[trap]: trap.md
## Sources
- [The Bash trap command]
[the bash trap command]: https://www.linuxjournal.com/content/bash-trap-command