From: "baptiste AuguiƩ" Date: 2007-07-01T22:13:16+09:00 Subject: awk regexp search --Apple-Mail-3-977445331 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Hi, The last bit of a bash program is still resisting me. Here is the code I used before: awk '/scattering efficiency/{print $4}' ../OUTPUTFILES/Output.dat How would you do that in Ruby? I just need to locate this regexp in the file, and get the following value in the same line. I've tried something like, output_file=IO.readlines('../OUTPUTFILES/Output.dat').to_s myarray = output_file.each_line(/scattering efficiency/){|elt| print elt.to_s, '\t'} but it clearly doesn't work. Best regards, baptiste --Apple-Mail-3-977445331--