Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Sep 1999 14:39:28 -0400
From:      "David S. Jackson" <dsj@dsj.net>
To:        freebsd-questions@FreeBSD.ORG
Subject:   bash syntax error...
Message-ID:  <19990913143928.A74001@juno.dsj.net>

next in thread | raw e-mail | index | archive | help
Hi,

I get the following error

/home/dsj/bin/ascfg: 175: Syntax error: "do" unexpected (expecting "}")

when I execute the following snippet from a bash script:

----SNIP----
ChangeLooks()                                 # backups for looks go into  
{                                             # a different backpath and 
  select file in $LOOKPATH/*; do              # reside in a different place.
    FILE=$LOOKPATH/$file                      # My kludge for editing/copying
    BACKPATH=$LOOKBACK                        # them kinda works, though.
    BackUp $FILE
    EditIt $FILE
    echo "Would you like to continue? [y/n] "
    read domore
    if [ $domore -eq y ]; then
	selectone
    else
	break
    fi
  done
}
-----SNIP-----

The variable names are all defined earlier in the script.  What confuses 
me is the error.  I don't see why the 'do' should cause a problem in a
select statement.  

Any ideas?

TIA!
--
David S. Jackson                       http://www.dsj.net
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
In theory, theory and practice are the same thing.  In practice,
they are different.      --Bruce Schnier


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990913143928.A74001>