Hi gurus,
I hit a block when write the script.
I need do while loop, in the loop I have code below.
sqlplus -s abc/abc@abc <<EOF
spool testwhile
select *
from dual;
spool off
exit;
EOF
when I run script with only this code, it works fine.
if I add code as below:
#!/bin/ksh
while :
do
sqlplus -s abc/abc@abc <<EOF
spool testwhile
select *
from dual;
spool off
exit;
EOF
sleep 10
done
I got error:
syntax error at line 5 : `<<' unmatched
1 #!/bin/ksh
2 while :
3 do
4 sqlplus -s EDSETL/edsetl11@EDR1D <<EOF
5 spool testwhile
6 select *
7 from dual;
8 spool off
9 exit;
10 EOF
11 sleep 10
12 done
Anybody can help me this?
Any input is very welcome
thanks in advance.