Trapping ctrl-c in Bash.md 358 B


Title: "Trapping ctrl-c in Bash" Date: 2018-01-29 11:42:07 Categories: [programming] tags: [bash]

Authors: sedlav

You can use the trap builtin to handle a user pressing ctrl-c during the execution of a Bash script. e.g. if you need to perform some cleanup functions.

Link