Topic: how to use linux commands in ruby ?

Hi
    I try to use 'at' command in ruby file. I am not able to do this. basically I want to run adhoc scheduling in my application.

Re: how to use linux commands in ruby ?

Have you tried the system() method?

ie.

system("date") #=> Mon May 28 12:08:03 MDT 2007

Last edited by Firanide (2007-05-28 14:08:34)

Re: how to use linux commands in ruby ?

You simply backquote the Linux command.  Like:

current_dir = `pwd`

Re: how to use linux commands in ruby ?

willirl wrote:

You simply backquote the Linux command.  Like:

current_dir = `pwd`

Or %x{}.