From: "Rebhan, Gilbert" Date: 2007-02-19T22:13:46+09:00 Subject: Re: system(...) redirect output to file ? Hi, did it with = newfiles=Array.new Dir.chdir(CVSWORKSPACE) pipe=IO.popen(".../cvs.exe -d :pserver:#{ENV["USERNAME"]}@cvsprod:d:/cvsrepos/test update") p pipe.readlines.each { |x| newfiles<<'.'<<'/'< ./subfolder1/file4.txt ./subfolder1/file5.txt Recommended or is there a better way ? -----Original Message----- From: Rebhan, Gilbert [mailto:Gilbert.Rebhan@huk-coburg.de] Sent: Monday, February 19, 2007 2:01 PM To: ruby-talk ML Subject: Re: system(...) redirect output to file ? Hi, -----Original Message----- From: Kalman Noel [mailto:invalid@gmx.net] Sent: Monday, February 19, 2007 11:45 AM To: ruby-talk ML Subject: Re: system(...) redirect output to file ? /* output = `command here` Note the use of backticks (`), and note that only the command's stdout is redirected. For more complicated use there is IO.popen. */ until now i redirected the output from cvs update command to a file, format looks like = ? subfolder1/file4.txt ? subfolder1/file5.txt and parsed it with = open($deployserver<<'/cvsout.txt').each { |x| newfiles<<'.'<<'/'<