From: Igor Pirnovar Date: 2009-02-10T06:59:49+09:00 Subject: Re: How to capture standart output to variable? 7stud -- wrote: > You can send output to a string: > > require "stringio" > . . . Do this with "stringio" ;) +-----------------------------------------------+ | >> pipe = IO.popen("/usr/games/fortune") | | => # | | >> capture = pipe.read | | => "You have taken yourself too seriously.\n" | | >> puts capture | | You have taken yourself too seriously. | | => nil | | >> | +-----------------------------------------------+ -- Posted via http://www.ruby-forum.com/.