Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #14501 > unrolled thread

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

Started byChet Ramey <chet.ramey@case.edu>
First post2018-08-15 11:18 -0400
Last post2018-08-15 11:18 -0400
Articles 1 — 1 participant

Back to article view | Back to gnu.bash.bug

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: "sh -a" sets the POSIXLY_CORRECT *environment* variable Chet Ramey <chet.ramey@case.edu> - 2018-08-15 11:18 -0400

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

FromChet Ramey <chet.ramey@case.edu>
Date2018-08-15 11:18 -0400
SubjectRe: "sh -a" sets the POSIXLY_CORRECT *environment* variable
Message-ID<mailman.5148.1534356737.1292.bug-bash@gnu.org>
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
ago.

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

[toc] | [standalone]


Back to top | Article view | gnu.bash.bug


csiph-web