From: Pra Bhandar Date: 2009-03-03T09:41:21+09:00 Subject: Re: Driving Oracle sqlplus with open3 Daniel Berger wrote: > ara.t.howard@noaa.gov wrote: >>> quit = 'quit' >>> # Hangs here >>> puts "ERROR: #{error}" >>> exit >>> end >>> puts output if output >>> end >>> >> >> try something like >> >> bash.execute cmd, 0 => sql+quit, 1 => STDOUT, 2 => STDERR > > > > Excellent! That worked, thanks. The only think I noticed was that I > had to > add an explicit newline to the sql statement to get it to work (but > remember to > keep the semicolon). > > For future Googlers, it's probably easier to parse the output if you > connect > with sqlplus -S (silent mode). > > Many thanks, > > Dan > > > This communication is the property of Qwest and may contain confidential > or > privileged information. Unauthorized use of this communication is > strictly > prohibited and may be unlawful. If you have received this communication > in error, please immediately notify the sender by reply e-mail and > destroy > all copies of the communication and any attachments. Hi Dan, Could you please post the snippet of the script after you made the changes? I am missing something i think in my similar script. Thanks much. Prakash -- Posted via http://www.ruby-forum.com/.