Forum: Ruby Ways to capture output stream of the process executed with e

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
3f4a3ca5891cfc2ca33c52e7f25cdfc9?d=identicon&s=25 Googy (Guest)
on 2007-01-26 09:50
(Received via mailing list)
Hi,

I need to capture output of the process executed with exec or other
eqavalent calls.

Thanks.
E0d864d9677f3c1482a20152b7cac0e2?d=identicon&s=25 Robert Klemme (Guest)
on 2007-01-26 10:00
(Received via mailing list)
On 26.01.2007 09:47, Googy wrote:
> I need to capture output of the process executed with exec or other
> eqavalent calls.

Look for popen() and variants.  Alternatively you can use backticks:
s = `ls -lF`

Kind regards

  robert
This topic is locked and can not be replied to.