cat name.txt | while read A
do
if [ $A -ne 5 ]
then
echo $A
else
echo 我要跳过
continue
fi
done
jrhmpt01:/root# sh ./a1.sh
1
2
3
4
我要跳过
6
7
8
9
10
shell 中的continue
最新推荐文章于 2025-06-12 09:37:01 发布
cat name.txt | while read A
do
if [ $A -ne 5 ]
then
echo $A
else
echo 我要跳过
continue
fi
done
jrhmpt01:/root# sh ./a1.sh
1
2
3
4
我要跳过
6
7
8
9
10