Operating System - HP-UX
1833406 Members
2791 Online
110052 Solutions
New Discussion

sh script error -: Syntax error at line 92 : `<<' is not matched.

 
SOLVED
Go to solution
skravi17
Advisor

sh script error -: Syntax error at line 92 : `<<' is not matched.

Hi

I am trying run compjsp.sh script basically
it will compile all jsp file. But i am not
able to execute the script. i am getting
./compjsp.sh[90]: Syntax error at line 92 : `<<' is not matched. please advise me how
to rectify the problem.

regards
ravi
11 REPLIES 11
Christian Gebhardt
Honored Contributor
Solution

Re: sh script error -: Syntax error at line 92 : `<<' is not matched.

Hi

- are there any special signs (tabs, white spaces, ..,) before ore after the ! in line 92 and line 167 ?

You can see this with "set list" in vi.

- Try another keyword, so replace ! by e.g NEWKEYWORD in line 92 and line 167

Chris
U.SivaKumar_2
Honored Contributor

Re: sh script error -: Syntax error at line 92 : `<<' is not matched.

Hi,
Try commenting this line and running the script
again.
cat << !

regards,
U.Sivakumar
Innovations are made when conventions are broken
skravi17
Advisor

Re: sh script error -: Syntax error at line 92 : `<<' is not matched.

Hi chris


I changed the cat << ! to cat << EOF
but this time i getting different error.
ksh: Header: parameter not set


regards

ravi
Christian Gebhardt
Honored Contributor

Re: sh script error -: Syntax error at line 92 : `<<' is not matched.

Do you have changed it in line 162 too ?
Christian Gebhardt
Honored Contributor

Re: sh script error -: Syntax error at line 92 : `<<' is not matched.

Hi
excuse me, line 167
I've tried your script and it works if you delete the white space after ! in line 167

Chris

syntax:
cat <text
...
...
KEYWORD

skravi17
Advisor

Re: sh script error -: Syntax error at line 92 : `<<' is not matched.

Hi chris


I changed both places. cat <
Robin Wakefield
Honored Contributor

Re: sh script error -: Syntax error at line 92 : `<<' is not matched.

Hi Ravi,

You have a trailing space after both "!" characters. I removed it and it all seems to work fine.

Rgds, Robin.
U.SivaKumar_2
Honored Contributor

Re: sh script error -: Syntax error at line 92 : `<<' is not matched.

Hi,
Try commenting lines staring with string header

regards,
U.SivaKumar
Innovations are made when conventions are broken
Bill McNAMARA_1
Honored Contributor

Re: sh script error -: Syntax error at line 92 : `<<' is not matched.

don't use keyword EOF or you'll run into trouble also.

use EOCAT or EOFTP etc..

Later,
Bill
It works for me (tm)
Jean-Louis Phelix
Honored Contributor

Re: sh script error -: Syntax error at line 92 : `<<' is not matched.

Hi Ravi,

You've already corrected some typos in your script, but I can still find some minor problems :

- try to avoid ending spaces. For example, if you use \ to continue a line, it should protect the CR, not a space. You can remove all endind spaces from vi simply using :

:%s/ *//

You have this at line 200.

- if you use " to define a string, the content of variables will be evaluated in execution. Sometimes you want it, sometimes you don't ... If you don't, rather use simple quotes '

In your case, $header will be evaluated to null in

header_string="$Header: compjsp.sh 1.03 2002/05/22 16:49:14 cpeixoto sh $"

if -u flag is set in an interpretor, then evaluating an unet variable will give the message 'parameter not set'. If you want to get an empty string for unset variables, just add

set +u

to you script to reset this flag.

Regards,

Jean-Louis.
It works for me (© Bill McNAMARA ...)
skravi17
Advisor

Re: sh script error -: Syntax error at line 92 : `<<' is not matched.

Hi


Thanks a lot! problem solved. once again
thanks to everybody.

regards
ravi