Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Nov 2002 18:43:15 -0800
From:      Chris Doherty <chris-freebsd@randomcamel.net>
To:        Greg Black <gjb@gbch.net>
Cc:        Lyndon Nerenberg <lyndon@orthanc.ab.ca>, freebsd-hackers@freebsd.org
Subject:   Re: finding unmatched quotes in shell scripts
Message-ID:  <20021119024315.GB24198@zot.electricrain.com>
In-Reply-To: <nospam-1037519839.91122@bambi.gbch.net>
References:  <200211170159.gAH1xCG1052133@orthanc.ab.ca> <nospam-1037519839.91122@bambi.gbch.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Nov 17, 2002 at 05:57:20PM +1000, Greg Black said: 
> Surely the simple thing is to put an exit statement in the
> middle of the script and see which half has the problem?  Move
> the exit statement forwards or backwards in a binary search
> until the problem leaps out and hits you in the face.

that's what I do. when I've had that error, it actually turns out to be
something fantastically stupid like this (I'm pretty sure this was what
happened):

foo () {
    # do stuff
    return }

which seemingly has nothing to do with quoting. (that may not be a valid
example, I'm pulling it from memory, but it was along those lines and
absolutely nothing to do with quotation marks.)

chris


-------------------------------
Chris Doherty
chris [at] randomcamel.net

"I think," said Christopher Robin, "that we ought to eat
all our provisions now, so we won't have so much to carry."
               -- A. A. Milne
-------------------------------

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




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