Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Jan 1995 18:31:24 -0700
From:      Steve Passe <fbsd@clem.systemsix.com>
To:        Jim Pirzyk <pirzyk@uxa.cso.uiuc.edu>
Cc:        freebsd-questions@FreeBSD.org
Subject:   Re: shell bug??? 
Message-ID:  <199501210131.SAA10443@clem.systemsix.com>
In-Reply-To: Your message of "Fri, 20 Jan 1995 15:50:39 CST." <199501202150.AA29761@uxa.cso.uiuc.edu> 

next in thread | previous in thread | raw e-mail | index | archive | help
Hello,

> These commands only exist in my $ENV file, which is ~/etc/rc.ksh and
> they do not happen when I test the file with 'ksh etc/rc.ksh'  Here
> is a typescript of what I have tested.
...
> The problem is that it seems that to run a subshell, it is first running
> /bin/sh and the $ENV file gets executed through that.  This is the only
> time I can force the errors to show up.

Somebody (ANSI, I think) decided that 'sh' would run $ENV, where it
didn't before.  I had this same problem, fixed by changing .profile:

from:

export ENV=$HOME/etc/rc.ksh
. $ENV

to:

export FILE=$HOME/etc/rc.ksh
ENV='${FILE[(_$-=0)+(_=1)-_${-%%*i*}]}'
export ENV

	I forget exactly what it does, but it works for me!



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199501210131.SAA10443>