#!/bin/bash
#Script written by Vaibhav Gupta
#Trapping HUP TERM INT and ^Z in shell.
echo "Process ID = $$";
stty susp "" #Trapping CTRL-Z
trap 'echo "Trapping CTRL-C, TERM and HUP";' HUP TERM INT
echo
echo "Sleeping for some time"
for i in `seq 1 20`; do
sleep 1
echo -n "."
done
echo
stty susp "^Z"
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment