This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: [ANNOUNCEMENT] Updated: dash-0.5.9.1-1
On 2017-02-24 07:32, Eric Blake wrote:
> On 02/23/2017 05:44 PM, Steven Penny wrote:
>> On Thu, 23 Feb 2017 12:59:27, Brian Inglis wrote:
>>> Some people may continue to need or prefer using bash in POSIX
>>> mode.
>> You might know this already, but "Bash in POSIX mode" is not quite
>> POSIX. For example, arrays are not defined by POSIX:
> You may not know this, but POSIX doesn't forbid extensions. Bash in
> POSIX mode does NOT cripple all extensions, merely those that are
> incompatible with POSIX. That's why so many people end up writing
> #!/bin/sh scripts with bashisms, then get surprised when they break
> on a different shell.
> If you want a STRICT shell, Debian's posh is even better than dash
> at ferreting out use of non-portable extensions.
For those interested, Cygwin packages are available for posh, a
"stripped down version of pdksh", and checkbashisms, a Perl script for
flagging any "shell feature that is not required to be supported by
POSIX".
Neither dash nor posh have dependencies other than cygwin1.dll, but
posh is not exactly lightweight at 598KB compared to dash at 99KB.
While posh may be good for checking scripts when installed as /bin/sh,
dash is a better choice for running scripts as a production /bin/sh.
--
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple