shell continue
shell continue
条件判断
#!/bin/bash
for (( i=0;i<=10;i++ ))
do
if (( i>0 && i<7 ));then
continue
else
echo "Number is $i"
fi
done
结果:
Number is 0
Number is 7
Number is 8
Number is 9
Number is 10
#!/bin/bash
for (( i=0;i<=10;i++ ))
do
if (( i>0 && i<7 ));then
continue
else
echo "Number is $i"
fi
done
结果:
Number is 0
Number is 7
Number is 8
Number is 9
Number is 10