Databases
cancel
Showing results for 
Search instead for 
Did you mean: 

I need to redirect and capture the Oracle SQL output from a shell script I have...

SOLVED
Go to solution
Chris Elmore
Frequent Advisor

I need to redirect and capture the Oracle SQL output from a shell script I have...

Aloha Folks,

I need to use a UNIX redirect (HP-UX 11i) to capture my Oracle SQL output from a shell script I have... I get some of the output but not all of the output from the console session from my Oracle 10G SQL prompt. I am just using the standard in/out redirect '>' to redirect the output to a simple text file. Any suggestions? TIA!

Very Respectfully,
Chris Elmore
"Life is love and love is life"
3 REPLIES
Ivan Ferreira
Honored Contributor
Solution

Re: I need to redirect and capture the Oracle SQL output from a shell script I have...

Have you tried:

script.sh > textfile.txt 2>&1

So you redirect the output and the error.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Chris Elmore
Frequent Advisor

Re: I need to redirect and capture the Oracle SQL output from a shell script I have...

Aloha Ivan,

You hit it right on the mark. Thanks for the quick response! Take care.

Very Respectfully,
Chris Elmore
"Life is love and love is life"
Chris Elmore
Frequent Advisor

Re: I need to redirect and capture the Oracle SQL output from a shell script I have...

ITRC rocks!
"Life is love and love is life"