标签:ctrl ash trap rap linu work cti echo func
#!/bin/bash
trap ‘onCtrlC‘ INT
function onCtrlC () {
echo ‘Ctrl+C is captured‘
}
while true; do
echo ‘I am working!‘
sleep 1
done
标签:ctrl ash trap rap linu work cti echo func
原文地址:https://www.cnblogs.com/mingzhang/p/11307292.html