Hello,
On Sun Solaris 8 I have the below Bourne shell script.
I use this techniqe alot to have an the Oracle sqlplus tool run using the commands I need all from a Bourne shell script.
My problem is that the commands on the 2nd and 3rd line must behave like they are at the beginning of the line, i.e. if I indent line 2 the script fails.
How can I use this technique (<< MYVAR) and be able to indent? I have been trying to put the command on one line but do not quite have it (this would work too). Unsuccessful example:
What advice can you give?
Thanks,
Michael42
On Sun Solaris 8 I have the below Bourne shell script.
Code:
$ORACLE_HOME/bin/sqlplus / << SQLPLUS_SESSION
SELECT * FROM mytable;
SQLPLUS_SESSION
I use this techniqe alot to have an the Oracle sqlplus tool run using the commands I need all from a Bourne shell script.
My problem is that the commands on the 2nd and 3rd line must behave like they are at the beginning of the line, i.e. if I indent line 2 the script fails.
How can I use this technique (<< MYVAR) and be able to indent? I have been trying to put the command on one line but do not quite have it (this would work too). Unsuccessful example:
Code:
$ORACLE_HOME/bin/sqlplus / << SQLPLUS_SESSION SELECT * FROM mytable; ...
What advice can you give?
Thanks,
Michael42