【Shell】Linux下执行shell脚本-范例
#!/bin/bash
export ORACLE_HOME=XXX
export ORACLE_SID=XXX
$ORACLE_HOME/bin/sqlplus -s / as sysdba << EOF
set heading off feedback off echo off
spool /home/oracle/test.sql
select 'create table test_t(id int);' from dual;
spool off
exit
EOF