![]() |
|
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
The Oblivious One
Join Date: May 2005
Location: Ontario, Canada
Posts: 641
Rep Power: 4
![]() |
Start another program from Ruby and view ouput?
I have a stupid question.
I know in Ruby you can get the output of a command by encasing itin backquotes. For example: $ irb irb(main):001:0> output = `uname -r` => "2.6.20-ARCH\n" Now, my question. Say I have a program like apt-get (pacman in this case). What I want to do is start the program from inside a Ruby script and see the output as it's running. I think this is possible, because I've seen it done in other scripts (though not necessarily Ruby). Any ideas? ![]()
__________________
Dr. Zoidberg: [ecstatic] I'm going to a movie... with FRIENDS! |
|
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|