From: 7stud -- Date: 2007-10-19T07:12:32+09:00 Subject: Re: extracting values from consecutive lines William James wrote: > > #!awk -f > /^158/, /^165/ { count++ > for (i=1; i<=NF; i++) > a[count, i] = $i + 0 > } > END { > for (i=1; (i,1) in a; i++) > { for (j=1; (i,j) in a; j++) > printf "%f ", a[i,j] > print > } > } baptiste Augui辿 wrote: > > How can I do that in Ruby? > If that wasn't clear enough for you, here's another clue: look at the title of the group you posted to. Does it say 'awk' anywhere? -- Posted via http://www.ruby-forum.com/.