[Top][All Lists]

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

Re: "sh -a" sets the POSIXLY_CORRECT *environment* variable

From: Chet Ramey
Subject: Re: "sh -a" sets the POSIXLY_CORRECT *environment* variable
Date: Wed, 15 Aug 2018 11:18:26 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

On 8/15/18 11:05 AM, Chet Ramey wrote:

>> causes it to set the value of the $POSIXLY_CORRECT shell
>> variable to "y" (if it was not already set)
> Yes. This behavior dates from early 1997. It was put in on request so users
> could get a posix environment from the shell, since GNU utilities
> understand the POSIXLY_CORRECT variable. I could improve the documentation
> there, but a 20-plus-year-old feature isn't going to change.

This is probably less clear than it should be. The `standard' GNU way to
indicate that an application is, or should be, in posix mode is to set
POSIXLY_CORRECT. Bash had a couple of different ways to do it (--posix,
-o posix), and the request was that I add the standard way to indicate
posix mode. As a side effect, users could then export the variable to get
a POSIX environment using the GNU utilities. Anyway, it all happened long

``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    address@hidden    http://tiswww.cwru.edu/~chet/

reply via email to

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