- 论坛徽章:
- 0
|
我试过了,5楼提示
HP-UX:/hwtest/shell>sed -n "/TCP.*SEND/,+10p" log.txt | sed -n "/^$/,+8p" c.txt
sed: Function /TCP.*SEND/,+10p cannot be parsed.
sed: Function /^$/,+8p cannot be parsed.
六楼
1、
HP-UX:/hwtest/shell>awk '/SEND/{n=8;i=0}/SEND/,n--==0{if(i++>2)print}' c.txt
742.2564
978.6179
1044.1491
1070.1761
1427.1565
1969.4728
942.7927
980.1376
1062.7501
1054.5864
1885.1118
2447.5760
2、
HP-UX:/hwtest/shell>sed '/SEND/,+8!d;/SEND/,+2d' c.txt
sed: Function /SEND/,+8!d;/SEND/,+2d cannot be parsed.
7楼提示
HP-UX:/hwtest/shell>sed -n '/SEND/,+10{/SEND/,+2d;p}' c.txt
sed: Function /SEND/,+10{/SEND/,+2d;p} cannot be parsed.
好像都得不到楼主想要的结果呢? |
|