Email List: Xaustin-group-lX
[All Lists]

Re: Enhancement request: SUS bootstrapping procedure for shell scripts

To: Wayne Pollock <pollock@xxxxxxx>
Subject: Re: Enhancement request: SUS bootstrapping procedure for shell scripts
From: Philip Guenther <guenther@xxxxxxxxx>
Date: Thu, 6 Aug 2009 01:07:09 -0700
Cc: austin-group-l@xxxxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=GNOoKVaYeduuQRmN6BI6ggAAYZios3U5naRKq2QXC3s=; b=tEUG9hHqFk9yEYXBTR7cE9pF7+4LgG0HSXF5XAOHTGpNUeMNtAFT/ksHA0wPoA5NuJ BFC3nvrcxMlAtJ1usbfXD3hxeFFYarTN7Lgt9jp1MyDzPh8w9nxzWQ4gL1wOCFLN6sua iN/KqzzlIfQNmZp+zyRxd4yhAQOjKSF0ylLBk=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=a7axHsMkzUV0FooWZ9qxD0CUnUSpcNMwRGhQaUFSFBhStask7EvdgiOk+dN59odzNv wSFRcBuVgf7LlMaAPUkFViF8ab8Ix67dM7QzEVNT4tnCenzjZugbmdjHSWbWZcFekipB p69GbOUjuSSdun295ssT0CB40zkVuzJAoOr6o=
References: <4A7A239F.5000109@acm.org>
On Wed, Aug 5, 2009 at 5:28 PM, Wayne Pollock<pollock@acm.org> wrote:
...
> To have this guaranteed to work under a POSIX shell you
> need one further change:  getconf should behave as if it
> were a built-in utility in a POSIX shell.

Isn't this requirement already met by the 'command' command, such that
given a shell that conforms to POSIX (SUS, etc), you can get a PATH
that will give utilities that conform to that standard using:
        PATH=$(command -p getconf PATH)     # optional: suffix that
with ":$PATH"

?  I think the only issue unresolved is just "how can a shell script
be portable written so that (the bulk of) it runs with a
POSIX-compliant shell?"


Philip Guenther

<Prev in Thread] Current Thread [Next in Thread>