Jason Kawaja <[EMAIL PROTECTED]> writes:

> /var/tcp/env -->
> 
> -rw-r--r--   1 root     sys           80 Mar  6 07:45 PATH
> 
> <> Contents of /var/tcp/env/PATH :
> 
> /usr/local/bin:/var/tcp:/var/qmail/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/sbin
> 
> <> Have tried the following:
> 
> echo $PATH && /var/tcp/envdir /var/tcp/env echo $PATH
> 
> <> Result :
> 
> 
>/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/var/tcp:/var/qmail/bin:/usr/ucb:/usr/ccs/bin:/usr/openwin/bin
> 
>/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/var/tcp:/var/qmail/bin:/usr/ucb:/usr/ccs/bin:/usr/openwin/bin
> 
> So, what am I missing?  Have read //cr.yp.to/daemontools/envdir.html

Variable substitution is done by the shell when it reads the command.
The $PATH in your example will be expanded when you type it, not after
envdir executes.

Try something like (untested)

echo $PATH && /var/tcp/envdir sh -c '/var/tcp/env echo $PATH'

Ian

Reply via email to