|
From: | Paul Eggert |
Subject: | bug#23090: true and false not POSIX |
Date: | Tue, 22 Mar 2016 12:31:50 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 |
On 03/22/2016 09:39 AM, Ruediger Meier wrote:
This misunderstands the intent of POSIXLY_CORRECT. Setting POSIXLY_CORRECT does not mean "remove all extensions not specified by POSIX". It merely means "conform to POSIX even where the default is to not conform".You could also let true behave like rm if POSIXLY_CORRECT is not set or if more than zero option given.
It might be helpful to have some other environment variable that meant "try to be strict about supporting only behavior required by POSIX", as one could use that to develop shell scripts that were more portable. However, that would be a lot of work to implement, and it's not clear it's worth the hassle to develop, maintain, and document. Plus, POSIX does not always specify behavior, so portability wouldn't be guaranteed by this.
[Prev in Thread] | Current Thread | [Next in Thread] |