Prøv at bruge en heredoc :
#!/bin/bash
sudo -iu user oracle <<XXX
cd /tmp;
. .sourceme;
sqlplus user/password << EOF;
SPOOL logfile.lst;
@runme.sql;
spool off;
exit;
EOF;
XXX
Prøv at bruge en heredoc :
#!/bin/bash
sudo -iu user oracle <<XXX
cd /tmp;
. .sourceme;
sqlplus user/password << EOF;
SPOOL logfile.lst;
@runme.sql;
spool off;
exit;
EOF;
XXX