From owner-freebsd-bugs Tue Mar 11 06:10:08 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id GAA05104 for bugs-outgoing; Tue, 11 Mar 1997 06:10:08 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id GAA05084; Tue, 11 Mar 1997 06:10:03 -0800 (PST) Date: Tue, 11 Mar 1997 06:10:03 -0800 (PST) Message-Id: <199703111410.GAA05084@freefall.freebsd.org> To: freebsd-bugs Cc: From: Stephen McKay Subject: Re: bin/2934: sh(1) has problems with $ENV Reply-To: Stephen McKay Sender: owner-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk The following reply was made to PR bin/2934; it has been noted by GNATS. From: Stephen McKay To: " steve howe" Cc: freebsd-gnats-submit@freebsd.org, syssgm@devetir.qld.gov.au Subject: Re: bin/2934: sh(1) has problems with $ENV Date: Tue, 11 Mar 1997 20:35:46 +1000 (EST) " steve howe" pretended to write: >/bin/sh processes $ENV fine if it has been set inside ~/.profile like: > > ENV=${HOME}/.env; export ENV > >However, it fails to source $ENV in this case: > > export ENV=${HOME}/.env I found the original stuff in -hackers, and just to prove that I'm capable to having a bet each way on each problem :-) I recreated his real problem: Under 2.1.5 (at least; can't check anything else right now): $ cat ~/junk echo Hi from junk $ export ENV=~/junk $ echo $ENV ~/junk $ sh -c date Tue Mar 11 20:29:58 EST 1997 $ ENV=~/junk $ export ENV $ echo $ENV /home/syssgm/junk $ sh -c date Hi from junk Tue Mar 11 20:30:42 EST 1997 $ So, ~ expansion happens differently in the two places. Fix one. Of course, when $ENV processing is removed, this will no longer be a problem. :-) (Am I the only one to heave when 'sh -c prog' executes $ENV?) Stephen.