From: Thomas Adam Date: 2004-03-06T03:18:49+09:00 Subject: Re: Ruby translation for UNIX scripting command --- Thomas Luedeke wrote: > pattern "test", and printing the fourth field, I'd do a grep plus awk > command such as:grep "test" file_name | awk ' { print $4 } ' >> > output_fileHowever, in my Ruby books, I don't see any discussion about You win the UuoGA (Useless Use of Grep Award). Why not let awk to the pattern matching? awk '/test/ {print $4}' < file_name >> ./some_other_file -- Thomas Adam ===== "The Linux Weekend Mechanic" -- http://linuxgazette.net "TAG Editor" -- http://linuxgazette.net " We'll just save up your sins, Thomas, and punish you for all of them at once when you get better. The experience will probably kill you. :)" -- Benjamin A. Okopnik (Linux Gazette Technical Editor) ___________________________________________________________ Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download Messenger Now http://uk.messenger.yahoo.com/download/index.html