Re: shell
- From: Geoff Clare <geoff@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 23 Mar 2006 14:39:32 +0000
Stephane Chazelas <stephane_chazelas@xxxxxxxx> wrote, on Wed, 22 Mar 2006:
# ensure `Unix' utilities
PATH=$(command -p getconf PATH; :):$PATH
export PATH
Unfortunately this method has a chicken-and-egg problem.
The output from "command -p getconf PATH" can vary depending on
whether you are running it in a conforming environment or not
(or in which conforming environment, if the system supports
multiple versions of the standard concurrently).
For example on Solaris 10, you only get the SUSv3 PATH out if
you already have PATH set to find the SUSv3 utilities before
the SUSv2 ones:
$ type sh
sh is a tracked alias for /usr/xpg4/bin/sh
$ sh -c 'PATH=/bin; command -p getconf PATH'
/usr/xpg4/bin:/usr/ccs/bin:/usr/bin:/opt/SUNWspro/bin
$ sh -c 'PATH=/usr/xpg6/bin:/usr/xpg4/bin:/bin; command -p getconf PATH'
/usr/xpg6/bin:/usr/xpg4/bin:/usr/ccs/bin:/usr/bin:/opt/SUNWspro/bin
--
Geoff Clare <netnews@xxxxxxxxxxxxx>
.
- Follow-Ups:
- Re: shell
- From: Stephane Chazelas
- Re: shell
- Prev by Date: Re: Dumb cal/sed questions
- Next by Date: Re: shell
- Previous by thread: Re: shell
- Next by thread: Re: shell
- Index(es):
Relevant Pages
|