[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Should this be this way?

From: Chet Ramey
Subject: Re: Should this be this way?
Date: Tue, 26 Feb 2013 09:30:20 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130216 Thunderbird/17.0.3

On 2/26/13 12:41 AM, Linda Walsh wrote:

>       It isn't using the current value of SHELL as my shell nor the value
> of my login shell.

It uses $0 (or, rather, the basename of $0), which is initialized from
the parent shell's argv[0].  What is $0 set to?

>       It is forcing interpretation into /bin/sh, which I don't use.

Not quite.  It is enabling posix mode.  There are a couple of ways to
do that: $POSIXLY_CORRECT, $0 == "sh", or set -o posix.


``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]