From: "Ara.T.Howard" Date: 2005-08-15T23:21:14+09:00 Subject: Re: Another Newbie question On Mon, 15 Aug 2005, LenS wrote: > I am running Ruby 1.8.2 on a XP machine. I have several programs > (executables) which convert text files to a special file format. I > would like to have these programs run from within a ruby script and > check the return code. > > In general how would you call the foo.exe program in ruby and check > return code. > > Thanks > Len Sumnler program, input, output = 'foo.exe', 'input.txt', 'output.txt' command = "#{ program } < #{ input } > #{ output }" system command exit_status = $?.exitstatus hth. -a -- =============================================================================== | email :: ara [dot] t [dot] howard [at] noaa [dot] gov | phone :: 303.497.6469 | Your life dwells amoung the causes of death | Like a lamp standing in a strong breeze. --Nagarjuna ===============================================================================