Trap
Execute command when shell receives signal
trap "<command>" <signal>[ ...]
Execute on shell exit
trap "<command>" { EXIT | 0 }
Show associated commands
trap -p
Show signal list
trap -l
Execute command when shell receives signal
trap "<command>" <signal>[ ...]
Execute on shell exit
trap "<command>" { EXIT | 0 }
Show associated commands
trap -p
Show signal list
trap -l