/var/root # seq 1 10 |awk '{while($0~7){print $0}exit}'
/var/root # seq 1 10 |awk '{while($0~7){print $0;exit}}'
7
/var/root # seq 1 10 |awk '{do{print $0}while(!($0=7))}'
/var/root # seq 1 10 |awk '{do{print $0;exit}while($0=7)}'
1
/var/root # seq 1 10 |awk '{while($0~7){print $0}exit}'
/var/root # seq 1 10 |awk '{while($0~7){print $0}}{exit}'
/var/root #
/var/root # seq 1 10 |awk '{while($0~7){print $0;exit}}1'
1
2
3
4
5
6
7
/var/root # seq 1 10 |awk '{while($0~7){exit}}1'
1
2
3
4
5
6
/var/root # seq 1 20 |awk '/2/,/8/{print}'
2
3
4
5
6
7
8
12
13
14
15
16
17
18
20
阅读(2390) | 评论(0) | 转发(0) |