how to avoid query output when called from shell script [message #206712] |
Fri, 01 December 2006 03:42 |
sridharreddy_d
Messages: 3 Registered: July 2006 Location: kualalumpur
|
Junior Member |
|
|
hi all,
I am starting sql*plus from shell script in order to execute an sql statement in the following way..,
sqlplus -s $pass << END
set pagesize 0 feedback off verify off heading off echo off linesize 100
spool move_to_disk.sh
select 'mv '||name || ' /export/home/oracle/disk2/' from v\$archived_log
where sequence# <= $seq;
spool off;
exit;
END
The select statement output is getting spooled as per requirement but,the select statement output is appearing on stdout when I run the shell script, which I want to avoid.
Can anyone please advice me as to how I can avoid sql statement output to appear on stdout and to only spooled it to file.
Thanks in advance,
Sridhar
|
|
|
|