23,121
社区成员
发帖
与我相关
我的任务
分享
#!/bin/sh
loop=0
sig_int()
{
echo " interrupt signal was catched "
echo "the loop is $loop"
exit 0
}
trap "sig_int" 2
while :
do
loop=`expr $loop + 1 `
done
#!/bin/sh
sig_int()
{
echo " interrupt signal was catched "
echo "the loop is $loop"
exit 0
}
trap "sig_int" 2
loop=1
while true
do
count=`expr $loop + 1`
loop=$count
done
#!/bin/sh
loop=1
sig_int()
{
echo " interrupt signal was catched "
echo "the loop is $loop"
exit 0
}
trap "sig_int" 2
while :
do
(( loop++ ))
done