On Nov 10, 6:00  
> Hi. I haven't written Ruby in a while, and I was wondering if someone
> could help with a problem I've never managed to solve. I'm writing a
> shell script that takes filenames as its arguments, and calls "du" to
> get their size. Because I don't want to have to escape everything
> perfectly, I was looking for a function with a syntax that allows
> separate arguments, like system("du", "-sh", filename).

def backtick(cmd,*args)
  IO.popen('-') {|f| f ? f.read : exec(cmd,*args)}
end

backtick 'du', '-sh', filename