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 <mike / stok.ca>
http://www.stok.ca/~mike/

The "`Stok' disclaimers" apply.