The GNU Awk User's Guide
有一列数
0.40
0.10
0.08
0.06
0.05
0.05
0.03
。。。
我想得到累到到第几行时其值大于0.60,并获得该值,为4
awk '{s+=$1}s>0.6{print NR;exit}' urfile
I think I must know about the AWK.So I got a Awk user's guide.
here: The GNU Awk User's Guide.
0.40
0.10
0.08
0.06
0.05
0.05
0.03
。。。
我想得到累到到第几行时其值大于0.60,并获得该值,为4
awk '{s+=$1}s>0.6{print NR;exit}' urfile
I think I must know about the AWK.So I got a Awk user's guide.
here: The GNU Awk User's Guide.