Skip to Content.
Sympa Menu

sm-grimoire - Re: [SM-Grimoire]getting error in this code, why?

sm-grimoire AT lists.ibiblio.org

Subject: Discussion of Spells and Grimoire items

List archive

Chronological Thread  
  • From: Tony Smith <tony AT smee.org>
  • To: nealbirch <nealbirch AT attbi.com>, eschabell AT sourcemage.org
  • Cc: sm-grimoire AT lists.ibiblio.org
  • Subject: Re: [SM-Grimoire]getting error in this code, why?
  • Date: Mon, 28 Oct 2002 10:14:20 +0000

On Sunday 27 October 2002 2:35 am, nealbirch wrote:
> Eric Schabell wrote:
> > Howdy all, need your help:
> >
> > Can someone tell me why this is giving me the following error when I
execute
> > (see code
> > below):
> >
> > ./POST_INSTALL: line 19: syntax error: unexpected end of file
> >
> > ***********************code
below********************************************
> > samba_test=$(grep "mkdir /var/run/samba" /etc/init.d/bootmisc.sh)
> >
> > if [ ! -n "$samba_test" ]; then
> >
> > cat >> /etc/init.d/bootmisc.sh <<EOF
> >
> > # added for samba
> > mkdir /var/run/samba
> >
> > # if needed add the following with correct values
> > # chmod <whatever> /var/run/samba
> > # chown <whomever> /var/run/samba
> > EOF
> > fi
> > *****************************************************************
>
> damned if I know why this works, but it does...
>
> delete the spaces before the final EOF and after.

It's because a "here" document terminator MUST appear at the beginning of a
line. Guaranteed to mess up your nicely indented code :-)

Tony





Archive powered by MHonArc 2.6.24.

Top of Page