Question : Unix shell script - suppress output of sql statements

#!/bin/ksh
echo " Enter Database Details: "
# After entering the details
sqlplus -s /nolog <conn sys/passwd@db as sysdba  #i want to suppress this output
startup pfile=$INIT_FILE migrate  #i want to suppress this output
spool temp.log
@?/rdbms/admin/catpatch.sql
spool off

--- Here the 'STARTUP' command outputs some data like 'instance started and all buffer sizes etc.'

I have used quiet option but it only supresses the buffer details, i would like to suppress the other details such as instance started...

Also while spooling the script output is written to the log file and as well as the terminal, i dont want the o/p to be displayed in the screen(terminal)

please suggest.
Thanks.

Answer : Unix shell script - suppress output of sql statements

-o /dev/null



-o filename
--output filename
    Put all query output into file filename. This is equivalent to the command \o.

Random Solutions  
 
programming4us programming4us