From: Tony Mcneil Date: 2008-09-18T05:01:11+09:00 Subject: Re: Getting Ruby to output a windows command to text (log) file. Erik Veenstra wrote: > See http://www.ruby-doc.org/core/classes/Kernel.html#M006001 : > > `cmd` => string > > Returns the standard output of running cmd in a subshell. The built-in > syntax %x{�} uses this method. Sets $? to the process status. > > `date` #=> "Wed Apr 9 08:56:30 CDT 2003\n" > `ls testdir`.split[1] #=> "main.rb" > `echo oops && exit 99` #=> "oops\n" > $?.exitstatus #=> 99 > > gegroet, > Erik V. hrm, I've tried looking over the documentation in the link you provided, but I'm having difficulty understanding it. Could you provide an example of the code? thanks again, ~Tony -- Posted via http://www.ruby-forum.com/.