From owner-freebsd-standards Sat Oct 26 20:53:48 2002 Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5AC3437B401 for ; Sat, 26 Oct 2002 20:53:47 -0700 (PDT) Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by mx1.FreeBSD.org (Postfix) with ESMTP id AD4B743E65 for ; Sat, 26 Oct 2002 20:53:46 -0700 (PDT) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: from khavrinen.lcs.mit.edu (localhost [IPv6:::1]) by khavrinen.lcs.mit.edu (8.12.3/8.12.5) with ESMTP id g9R3rWgQ027244 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Sat, 26 Oct 2002 23:53:33 -0400 (EDT) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.12.3/8.12.5/Submit) id g9R3rWRM027241; Sat, 26 Oct 2002 23:53:32 -0400 (EDT) (envelope-from wollman) Date: Sat, 26 Oct 2002 23:53:32 -0400 (EDT) From: Garrett Wollman Message-Id: <200210270353.g9R3rWRM027241@khavrinen.lcs.mit.edu> To: Tony Finch Cc: freebsd-standards@FreeBSD.ORG Subject: Re: /usr/posix: a first cut In-Reply-To: <20021027032512.A27342@chiark.greenend.org.uk> References: <200210262036.g9QKadk2025534@khavrinen.lcs.mit.edu> <200210262115.g9QLFeCw014715@dotar.thuvia.org> <200210262224.g9QMO4pw026010@khavrinen.lcs.mit.edu> <20021027032512.A27342@chiark.greenend.org.uk> Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG < said: > As far as I can tell you have to explicitly put /usr/xpg4/bin in your > path on Solaris in order to get post-1980s behaviour, and it will not > do that for you by default. `getconf PATH' reports it as first, so a script (or more likely an installation program) can use that to find where the Proper Shell really lives. Other programs which might care about the standard path are supposed to call confstr(_CS_PATH) to find it, but may well be broken. (This is, by the way, one of the reasons why the `#!' hack is not and likely never will be standardized.) > Coding "portably" (i.e. coding to standards) is all very well, but it > does not mean that your code will run on lots of systems. If you want to > write a script that will run on many unices then you have to code to the > 7th Edition. Actually, if you really want to go back that far into ancient history, you would have to code for the intersection of V7 and every official and unofficial standard released since then. (That means, among other things, protecting your `expr' command arguments from undesired alternative interpretations. Let's please keep in mind that -current's `expr' now for the first time conforms to a TEN-YEAR-OLD STANDARD, 1003.2-1992.) > FreeBSD should remain compatible with that It never has been, since our shell makes at least an attempt at accepting the POSIX grammar, of which the V7 shell language is not a proper subset. I'm not sure if Tom Duff's comment on the original Bourne shell language[1] doesn't still apply. -GAWollman [1] ``This is surely an oversight, but it suggests something darker: Nobody really knows what the Bourne shell's grammar is. Even examination of the source code is little help.'' To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message