Subject: Re: ksh and ssh questions
To: None <fredb@immanent.net>
From: Big Bird <geary@acm.org>
List: port-mac68k
Date: 02/14/2002 13:49:55
"Frederick Bruckman" <fredb@immanent.net> writes:
< On Tue, 12 Feb 2002, John Klos wrote:
< > 
< > > Secondly, I'm using the Korn shell on both machines. They both claim
< > > to be the same version (PD KSH v5.2.14 99/07/13.2). The first few
< > > lines of my .env are:
< > >
< > > if [ ! -o interactive ]; then
< > >     return
< > > fi
< > >
< > > On the OpenBSD machine this works as intended. On the NetBSD machine I
< > > get things like this:
< > >
< > > bree 0 3:09pm:/usr/share/misc> man tput
< > > [: interactive: unexpected operator
< >
< > Hmmm... Can't help you there... anyone else?
<
< This is what I have in ENV=~/.shinit:
<
< # Interactive only follows
< #
< case $- in *i*)
<
< blah
<
< esac # interactive

Further investigation suggests that the Bourne shell is being started
somewhere. I changed my .profile to be just:

export ENV=.env

and logged in again. I inserted

echo $0

at the top of my .env then...

 0 1 11:40am> /usr/bin/man ksh
sh
[: interactive: unexpected operator

So the questions are:

Why is the bourne shell being started when I run some programs, such
as man? (But other programs, such as vi don't start a shell).

Why is sh calling my .env? (Or is the echo $0 lying?)

Mark Geary