[ANNOUNCEMENT] Updated: dash-0.5.9.1-1
Steven Penny
svnpenn@gmail.com
Tue Feb 28 21:43:00 GMT 2017
On Tue, 28 Feb 2017 15:52:15, cyg Simple wrote:
> Ironic that *you* should make the same argument for using #!/bin/bash as
> I've made to you about using #!/bin/dash.
Its not the same argument:
- You are talking about people assuming Dash is /bin/sh
- I am talking about people assuming Bash is /bin/sh
Both are wrong, but assuming Dash is /bin/sh is leagues more innocuous:
- Dash doesnt have arrays
- Dash doesnt have herestrings
- Dash doesnt have process substitution
- etc
So even if someone does mess up and include a Dashism with /bin/sh, it should be
trivial to fix. If you include heavy Bashisms with /bin/sh, it can be very hard
to undo that. Dash is not interchangable with POSIX sh, but it is certainly
closer than Bash.
> But that doesn't mean you should expect /bin/sh to be dash.
I certainly dont expect that. I expect /bin/sh to be POSIX sh, and try to write
my scripts accordingly. Dash helps with this because it forces you to lose
Bashisms when writing scripts.
> The idea is only sound because it uses less resources and when we're talking
> about Windows a little resource makes a big difference.
Exactly. Even with Dash as /bin/sh, we are still about 5x slower than Linux
/bin/sh. People who are using /bin/sh with the assumption that it is Bash can
just change their shebang, or remove the Bashisms from their /bin/sh scripts.
--
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
More information about the Cygwin
mailing list