从查询SQL输出文件的方法:
cd /secom/test/testappl
. ./APPSORA.env
sqlplus -S "apps/apps@test" << !
set verify off;
set wrap off;
set echo off;
set term off;
set heading off;
set feedback off;
set pagesize 0;
set linesize 1000;
set trimspool on;
spool /home/oratest/mtora/data.txt;
@/home/oratest/mtora/k.sql;
exit;
!
while read data; do
echo $data
kill -9 $data
done < /home/oratest/mtora/data.txt