#! /bin/bash
trap 'echo "you art typing Ctrl-c,sorry,script will not terminate."' INT
trap 'echo "you are ctrl-\,script will not terminate."' QUIT
trap 'echo "you art typing Ctrl-z."' TSTP
while true;do
echo "now,test signal date
"
sleep 3
done
转载于:https://blog.51cto.com/546136/2070109