Re: shell
- From: Stephane Chazelas <stephane_chazelas@xxxxxxxx>
- Date: 24 Mar 2006 15:46:32 GMT
On Fri, 24 Mar 2006 14:07:56 +0000, Geoff Clare wrote:
[...]
command -p env -i PATH=/undef /usr/xpg4/bin/sh -c '
command -p getconf PATH'
As far as the standard is concerned, the behaviour is undefined.
Utilities are only required to behave as described in the standard
if they are executed in a "conforming environment" (which includes
which environment variables are set among other things).
So, how do you force a XPG4 or XPG6 "conforming environment" in
a portable way? (based on a "case `uname`"?).
The suggested method (not yet implemented) in the link you
refered to:
env -i $(getconf V6_ENV) $(getconf PATH) command
(I suppose they mean
env -i -- $(getconf V6_ENV) "PATH=$(getconf PATH)" command
Doesn't seem to work. First, there are issues with the current
value of IFS and globbing, and the second getconf will not be
run in a "conforming environment", so PATH may not be correct,
and it clears my environment, that's not what I want.
--
Stephane
.
- Follow-Ups:
- Re: shell
- From: Geoff Clare
- Re: shell
- References:
- Prev by Date: Re: Unix Shell
- Next by Date: Re: automatic mount on system startup
- Previous by thread: Re: shell
- Next by thread: Re: shell
- Index(es):
Relevant Pages
|