Operating System - HP-UX
1752790 Members
6385 Online
108789 Solutions
New Discussion

Remote command:warning: here-document at line 5 delimited by end-of-file (wanted `EOF1')

 
SGS16
Advisor

Remote command:warning: here-document at line 5 delimited by end-of-file (wanted `EOF1')

Hi ,

The script works fine in  server.but while run via remote command operation it is showing end -of  file wanted

the script:


export ORACLE_HOME=/u01/app/oracle/product/12.1.0/DB
export PATH=$ORACLE_HOME/bin
export ORACLE_SID=<dbname>
sqlplus -s $user/$pwd@$ORACLE_SID <<-EOF
select name from v\$database ;
exit;
EOF

it works fine in server ..but in tool i got warning as EOF 

2 REPLIES 2
Patrick Wallek
Honored Contributor

Re: Remote command:warning: here-document at line 5 delimited by end-of-file (wanted `EOF1')

When you use the '-' at the end of the here document it is expecting the EOF to be indented via a single TAB.

 

For example:

ftp machine <<- EOF
     cd dirName
     put file1
     quit
     EOF

If you do NOT use the '-' character, then the EOF has to start at the beginning of the line.

Steven Schweda
Honored Contributor

Re: Remote command:warning: here-document at line 5 delimited by end-of-file (wanted `EOF1')

> The script works fine in  server.but while run via remote command
> operation it is showing end -of  file wanted

   What, exactly, does "run via remote command operation" mean to you?
As usual, showing actual commands with their actual output can be more
helpful than vague descriptions or interpretations.

> it works fine in server ..but in tool i got warning as EOF

   "in tool"???

   What is/are the system(s) involved here?

      uname -a

   What, exactly, are you doing?  What, exactly, happens when you do it?