I have a bash script I've been using for ages. It has a few lines it just start/stop some jobs in database. It is very simple and it never fails. Last year, it facts in December so a few days ago :) I migrated whole data to a new machine. And then my problem starts. Now script works as it worked before but now it returns warning. Below output:
[oracle@SVMSLUATTIADB1 ~]$ ./batch.sh stop
./batch.sh: line 87: warning: here-document at line 85 delimited by end-of-file (wanted `!')
./batch.sh: line 87: warning: here-document at line 85 delimited by end-of-file (wanted `!')
Batch_Executer_1 [NOT OK]
Batch_Executer_2 [NOT OK]
[oracle@SVMSLUATTIADB1 ~]$
The piece of code mentioned in warning is:
batch_stop()
{
for BATCH in $BATCHES
do
SQLRES=`sqlplus -S "/ as sysdba" << !
exec dbms_scheduler.disable('"AIT"."${BATCH}"', TRUE);
` << line 87
done
}
So the question is how to avoid/hide this warnings. It is not critical, script works as it worked but the view of warning disturbs. I see that before I had bash version 3.2.25 but now it is bash 4.1.2.
I tried to modified my code and redirected output :
{SQLRES=`sqlplus -S "/ as sysdba" << !
exec dbms_scheduler.disable('"AIT"."${BATCH}"', TRUE);
` } 2>/dev/null
but it didn't help :(