From owner-freebsd-questions Fri Jan 20 17:30:27 1995 Return-Path: questions-owner Received: (from root@localhost) by freefall.cdrom.com (8.6.9/8.6.6) id RAA00485 for questions-outgoing; Fri, 20 Jan 1995 17:30:27 -0800 Received: from clem.systemsix.com (clem.systemsix.com [198.99.86.131]) by freefall.cdrom.com (8.6.9/8.6.6) with ESMTP id RAA00447 for ; Fri, 20 Jan 1995 17:30:21 -0800 Received: from clem.systemsix.com (localhost [127.0.0.1]) by clem.systemsix.com (8.6.5/8.6.5) with ESMTP id SAA10443; Fri, 20 Jan 1995 18:31:25 -0700 Message-Id: <199501210131.SAA10443@clem.systemsix.com> To: Jim Pirzyk cc: freebsd-questions@FreeBSD.org Subject: Re: shell bug??? In-reply-to: Your message of "Fri, 20 Jan 1995 15:50:39 CST." <199501202150.AA29761@uxa.cso.uiuc.edu> Date: Fri, 20 Jan 1995 18:31:24 -0700 From: Steve Passe Sender: questions-owner@FreeBSD.org Precedence: bulk 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!