Handle a signal in a shell script.
Section: Signals Reference and Delivery
Trap shell signals
bash
bash
trap "echo caught INT" INTExplanation
Handle a signal in a shell script.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Signals Reference and Delivery