1848792 Members
7271 Online
104036 Solutions
New Discussion

EOF Script Help.

 
SOLVED
Go to solution
ben_43
Frequent Advisor

EOF Script Help.

Team:

I am having trouble with this part of the script. Each of these commands would work fine seperately(inside EOF)

/opt/config.sh <select MMOPAR
set enable=no
save
exit
EOF
when i execute the script it says in the eof line "<<" not expected and also "set" not expected Is there any problem with the space between set and enable. How do i handle this in EOF?Please advice.
Thanks
Ben
7 REPLIES 7
George Morrison
Frequent Advisor

Re: EOF Script Help.

It appears you have left a space between the first < and the second <: "< <". There should not be a space: "<<"
George Morrison
Frequent Advisor

Re: EOF Script Help.

After I posted that it looks like a trick with my browser.

"Nevermind"
James R. Ferguson
Acclaimed Contributor
Solution

Re: EOF Script Help.

Hi Ben:

Make sure that no blank (space) characters appear before the EOF.

Regards!

...JRF...
Darrell Allen
Honored Contributor

Re: EOF Script Help.

Be sure to left justify (no leading whitespace) everything between the "<
I'm fairly certain there is a way to indent those lines but I don't know it off the top of my head. Seems it was with changing IFS?

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
James R. Ferguson
Acclaimed Contributor

Re: EOF Script Help.

Hi Darrell:

If the form of the "here" document is:

<
then all leading *tabs* are stripped from word and from the document.

Regards!

...JRF...
Darrell Allen
Honored Contributor

Re: EOF Script Help.

Thanks Jim. I'll try to remember that.

No points here, please.

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
Darrell Allen
Honored Contributor

Re: EOF Script Help.

Hi Ben,

What shell is this script using? What about /opt/config.sh?

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)