From: nobu@... Date: 2006-09-13T08:24:12+09:00 Subject: Re: getting the last word in each line Hi, At Wed, 13 Sep 2006 06:57:47 +0900, Joe Van Dyk wrote in [ruby-talk:214152]: > File.read(some_file).to_a.map { |l| line.split.last } $ ruby -e 'p open(ARGV[0]){|f|f.grep(/(\w+)\s*$/){$1}}' version.h ["190", "20060912", "1", "9", "0", "2006", "9", "12"] -- Nobu Nakada