From owner-freebsd-hackers Mon Nov 18 18:43:18 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D58F337B401 for ; Mon, 18 Nov 2002 18:43:16 -0800 (PST) Received: from electricrain.com (electricrain.com [64.71.143.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2F26943E6E for ; Mon, 18 Nov 2002 18:43:16 -0800 (PST) (envelope-from fuzzy@electricrain.com) Received: (qmail 30626 invoked by uid 540); 19 Nov 2002 02:43:15 -0000 Date: Mon, 18 Nov 2002 18:43:15 -0800 From: Chris Doherty To: Greg Black Cc: Lyndon Nerenberg , freebsd-hackers@freebsd.org Subject: Re: finding unmatched quotes in shell scripts Message-ID: <20021119024315.GB24198@zot.electricrain.com> Reply-To: chris-freebsd@randomcamel.net References: <200211170159.gAH1xCG1052133@orthanc.ab.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i X-Operating-System: XEmacs X-Koan: mu. Organization: The Inside Foundation Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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