From: "(rkumar) Sentinel" Date: 2009-12-23T13:34:02+09:00 Subject: Re: awk print $4 in ruby Derek Smith wrote: > Hi All, > > I had played in Ruby a while and could not get this to work. > > df -m > Filesystem 1M-blocks Used Avail Capacity Mounted on > /dev/concat/v109-v112a 7931 2619 4677 36% / > > [root@vr /usr/local/vrep/OS_scripts]# df -k |awk '{print $4}' > Avail > 4789776 Is this what you want ? df -k | ruby -lane 'print $F[3]' -- Posted via http://www.ruby-forum.com/.