#scriptfor i in `zgrep -l $1 PSAATL11*`do for j in `zgrep -n $1 $i | awk -F ':' '{print $1}'` do ((k=j+1)); m=$(zcat $i | sed -n ${j},${k}p); echo $m; #echo $m |awk -F ' ' '{print $5}'; donedone#指定行数语法点:sed -n, p file#输出分割后字段语法:awk -F ' ' '{print $num}'#变量增减((j=j+1))#for 循环for i in ....do xxxdone