Re: ** UNIX : set echo on in shell

From: A Joshi <ajoshi977_at_yahoo.com>
Date: Mon, 2 Mar 2009 20:32:37 -0800 (PST)
Message-ID: <362246.33711.qm_at_web57513.mail.re1.yahoo.com>



Mike,
  Thanks. Can you give example for tee. Thanks Howard, Bill, Dan, Mindagaus, Dave  
I tried
 
set -x
sqlplus ... 1>$OUTFIL
2>&1".
set +x
 
but somehow the log does not have the sqlplus command. The log has rest of the output. I can see the commands being displayed on the screen. I am doing :  
set -x
 
sqlplus -s $user_at_db1 _at_sql1.sql <.pw  > $OUTFILE  2>&1 sqlplus -s $user_at_db2 _at_sql1.sql <.pw  >> $OUTFILE  2>&1 set +x

Thanks

  • On Sun, 3/1/09, Mike Haddon <m.haddon_at_tx.rr.com> wrote:

From: Mike Haddon <m.haddon_at_tx.rr.com> Subject: Re: ** UNIX : set echo on in shell To: oracle-l_at_freelists.org
Date: Sunday, March 1, 2009, 10:53 PM

if your looking for output to both stdout and a logfile either script or tee

script will put everything into a logfile and tee will split stdout to a logfile as well

I.E - <shell command> | tee <file_name>
> Another option is simply "ksh -x sqlplus ... 1>$OUTFIL
2>&1".
> ---------------------------------------------------------------------
> Hi,
> I am looking for a shell equivalent of set echo on. set -x works and
gives the output on the screen. I am looking for a way so that it also goes to the LOGIFLE. So I can get the command being executed in the log. For example if I have :
> set -x sqlplus .... > $OUTFIL ... set +x
>
> Then I want the output to go to log file. It displays on the screen but
does not go to log. From the log it is difficult to know which sqlplus had the error. I tried to put a echo before the sqlplus to know it but i have to update it each time so looking for a better way. Zoran and Frank helped out dba village and I have made progress to this point. Could not find much on net. Thanks
>

--
http://www.freelists.org/webpage/oracle-l





      

--
http://www.freelists.org/webpage/oracle-l
Received on Mon Mar 02 2009 - 22:32:37 CST

Original text of this message