From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from newton.hartwick.edu ([147.205.85.10]) by hawkwind.utcs.utoronto.ca with SMTP id <24768>; Thu, 9 Dec 1999 03:03:49 -0500 Received: from c26469-a.clnvl1.ct.home.com (147.205.108.160 [147.205.108.160]) by newton.hartwick.edu with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2448.0) id X52J4326; Thu, 9 Dec 1999 02:38:12 -0500 Received: by c26469-a.clnvl1.ct.home.com (sSMTP sendmail emulation); Thu, 9 Dec 1999 02:37:35 -0500 Date: Thu, 9 Dec 1999 02:37:35 -0500 From: Decklin Foster To: rc@hawkwind.utcs.toronto.edu Subject: Re: rc error messages from scripts Message-ID: <19991209023735.A305@debian> References: <199912081509.QAA05614@trillian.softwell.se> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii User-Agent: Mutt/1.0i In-Reply-To: <199912081509.QAA05614@trillian.softwell.se>; from bengt@softwell.se on Wed, Dec 08, 1999 at 10:09:34AM -0500 Bengt Kleberg writes: > When developing scripts I sometimes get the error message: > line 25: syntax error near '(' I agree this is annoying. Equally annoying is this: ; ) syntax error ; mbogo mbogo not found I want it to print "rc: syntax error" (or better yet, "syntax error near ')'"). In general, the UNIX custom for these things is that the basename of argv[0] should be printed before the error. (Unless it's set to '-rc' for a login shell, in which case we should change it to 'rc'.) I note that bash handles segfaults as a special case, and just prints "Segmentation fault". I'd be more inclined to go for consistency and use "rc: segmentation fault". But might that cause people to think rc was segfaulting? Perhaps, "rc: segmentation fault in child proccess 1234". How's that? I'll volunteer to do the work for this, as long as Tim thinks it's a good idea. -- Decklin Written with Debian GNU/Linux - http://www.debian.org/