From: Albert Schlef Date: 2009-12-31T10:31:18+09:00 Subject: Re: awk print $4 in ruby, NEW QUESTION? Derek Smith wrote: > df = %x(df -m |tail +2) On my system (Linux) "tail +2" doesn't work. You have to write it "tail -n +2". If on your system this doesn't work, it means that this function isn't portable and you should strip the header line via Ruby instead. > > if ARGV.empty? > $stderr.puts "An argument of filesystem is required > to run this script, bye!" > exit 1 > end > > p FsData.new(ARGV[0]).rundf Or do: p FsData.new(ARGV[0] || (raise "Argument not suplied")).rundf -- Posted via http://www.ruby-forum.com/.