#! /bin/sh # Example to show signal handling trap "echo 'Dont hang me up, baby'" HUP trap "echo 'You sent me a SIGINT'" INT trap "echo 'Oh, dont send the TERMinator please!'" TERM trap "echo 'Never quit! Dont give up!'" QUIT while : do sleep 20 done