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
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