From owner-freebsd-hackers Tue Nov 19 11: 5:55 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 E926837B401 for ; Tue, 19 Nov 2002 11:05:53 -0800 (PST) Received: from softweyr.com (softweyr.com [209.63.227.49]) by mx1.FreeBSD.org (Postfix) with ESMTP id 378AA43E4A for ; Tue, 19 Nov 2002 11:05:53 -0800 (PST) (envelope-from wes@softweyr.com) Received: from homer.softweyr.com ([204.68.178.39] helo=softweyr.com) by softweyr.com with esmtp (Exim 3.35 #1) id 18EDgX-0000Lq-00; Tue, 19 Nov 2002 12:05:21 -0700 Message-ID: <3DDA8B7C.9BA63DC8@softweyr.com> Date: Tue, 19 Nov 2002 11:05:32 -0800 From: Wes Peters Organization: Softweyr LLC X-Mailer: Mozilla 4.78 [en] (X11; U; Linux 2.4.2 i386) X-Accept-Language: en MIME-Version: 1.0 To: Greg Black Cc: Lyndon Nerenberg , freebsd-hackers@freebsd.org Subject: Re: finding unmatched quotes in shell scripts References: <200211170159.gAH1xCG1052133@orthanc.ab.ca> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 Greg Black wrote: > > Lyndon Nerenberg wrote: > > | I've tried a number of syntax-colouring editors, to no avail. The quotes > | (single, double, and back) *are* balanced, according to everything I've > | thrown the script at. That's why I'm more interested in something that > | can actually parse Bourne shell syntax (quiet Terry - I *know* what > | you're going to say) and dump out what it thinks the parse tree looks > | like. The problem isn't with the quotes being unbalanced, it's something > | else that's making the shell ignore one (or more) of those quotes. > > 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. Or simply set -x at the beginning of the script? -- "Where am I, and what am I doing in this handbasket?" Wes Peters Softweyr LLC wes@softweyr.com http://softweyr.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message