CTRL+C异常捕获

CTRL+C异常捕获

trap ‘onCtrlC’ INT
function onCtrlC () {
echo ‘Ctrl+C is captured’
echo ‘Program exit exceptionally ,You can rerun the script!’
exit 1
}

posted @ 2019-03-15 16:19  岳麓丹枫  阅读(440)  评论(0编辑  收藏  举报