linux:trap-ctl-c
Trap Ctrl-C in script
#!/bin/bash #trapping Control + C #these statements must be the first statements in the script to trap the CTRL C event trap ctrl_c INT function ctrl_c() { logMsgToConfigSysLog "INFO" "INFO: Aborting the script." exit 1 } #Rest of script
linux/trap-ctl-c.txt · Last modified: by 127.0.0.1