From: Mike Stok Date: 2009-12-24T03:00:10+09:00 Subject: Re: awk print $4 in ruby On Dec 23, 2009, at 12:55 PM, Mark Thomas wrote: > How about this? > > IO.popen('df -h').each_line do |line| > fsarray = line.chomp.split > puts fsarray[3] > end Have I missed the response mentioning the -n and -a flags to ruby? $ df -h | ruby1.8 -na -e 'puts $F[3]' Avail 9.0G 506M 506M 506M 506M 467M 85G 9.0G Mike -- Mike Stok http://www.stok.ca/~mike/ The "`Stok' disclaimers" apply.