Redirection question
If I have
print "sqlplus "\'"/ as user"\'" <<EOF" >> file1 print "@dbscript" >> file1 print "EOF" >> file1 Why would unix actually login to sqlplus and execute dbscript instead of just printing "sqlplus "\'"/ as user"\'"? Can someone explain the order of the redirection in the above sample? Thanks. |
Which shell are you using? It works if you use echo instead of print? The resulting output should be
Code:
sqlplus '/ as user' <<EOF |
That is what it is doing(get rid of the EOF in the code you posted). I want to know why dbscript gets executed. I am using ksh.
|
It works on my system, with ksh-93t. I don't see anything strange in your code. The print statement and the quoting should prevent the shell to execute anything. What is the output of the following command?
Code:
type print |
All times are GMT -5. The time now is 01:54 PM. |