sh: syntax error at line 8 : `<<' is not matched.

Hi,

I am trying to execute the above attached script. and i am getting the error as syntax error at line 8: `<<' is not matched.

While i am trying to run that particular line (cat <<EOF > /tmp/query.sql) independently in the prompt it is running successfully without any error.

I am running it in HP-UX machine and while executing it i am trying using both $./test.sh and $test.sh

Can anyone help me out on this issue?

Thanks in advance.

--Satya

You have the same problem in line 10: The token designating the end of the here-document (in your case EOF) has to be at the very beginning of the line, without any whitespaces.

Also, keep in mind that anything between the beginning and the end marker is taken literally, including any whitespaces you put at the beginning of a line.

Hi.

Thanks for the reply.

Now i removed the whitespace and it is working fine.

Thanks,
Satya.