Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Jun 1999 11:16:11 +0200
From:      Jeroen Ruigrok/Asmodai <asmodai@wxs.nl>
To:        bugs@freebsd.org, era@iki.fi
Subject:   Re: bin/2851: script(1) sets argv[0] of the started shell to "sh"
Message-ID:  <19990616111611.E12266@daemon.ninth-circle.org>

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

I just tested this under my 4.0-CURRENT and $0 still reports sh so script
still changes argv[0] to sh.

However, given some testing on my CURRENT box and reading the latest
manpage on script(1) I stumbled on the following:

ENVIRONMENT
     The following environment variable is utilized by script:

     SHELL  If the variable SHELL exists, the shell forked by script will be
            that shell. If SHELL is not set, the Bourne shell is assumed.
            (Most shells set this variable automatically).

So I tested this with my ksh:

[asmodai@daemon] (29) $ set | grep SHELL
SHELL=/usr/local/bin/ksh

Then started a script and could still use my aliases and other features.

Can you verify if Bash still behaves differently, I think you need 3.x or
higher (of FreeBSD that is) based on what I found in the ,v files of script.

With kind regards,

-- 
Jeroen Ruigrok van der Werven                asmodai(at)wxs.nl
        The *BSD Programmer's Documentation Project 
Network/Security Specialist      <http://home.wxs.nl/~asmodai>;
*BSD & (g)VIM : Accept no limitations...


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




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