/bin/sh Bash vs Dash

274 views
Skip to first unread message

Fred Richardson

unread,
Mar 27, 2016, 4:55:32 PM3/27/16
to kaldi-help
Our Ubuntu queue currently uses "dash" as /bin/sh (the default).  I was about to make a request to our sysadmins that they change it so that /bin/sh points to /bin/bash (mainly for Kaldi).  However, there is a vaguely ominous statement about making this change in Ubuntu from the Ubuntu wiki https://wiki.ubuntu.com/DashAsBinSh

"Beware that this is a more invasive change, will undo boot speed benefits, and there is even an outside chance that there are a few scripts that now depend on some feature of dash that bash does not provide! (We expect the last problem to be rare, as the feature set of dash is largely a subset of that offered by bash, but we mention it for completeness.) "

Has anyone run into problems with /bin/sh pointing to bash for Ubuntu 12.04 or 14.04?

Thanks,

-Fred

Daniel Povey

unread,
Mar 27, 2016, 4:58:50 PM3/27/16
to kaldi-help
I have not heard of any such problems- we use bash on our system which is debian and has a lot of packages.
Dan


--
You received this message because you are subscribed to the Google Groups "kaldi-help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kaldi-help+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Fred Richardson

unread,
Mar 27, 2016, 6:04:02 PM3/27/16
to kaldi-help, dpo...@gmail.com
Yes, I was reading that Debian made the (perhaps wise) choice to keep /bin/sh pointing to bash.  Ubuntu wanted to improve load time by switching to the leaner dash - I'm not sure I agree with the decision.  I'll check with our admins on making this change.

I have run Kaldi without making this change and I think there were only a few places where it mattered.  I don't recall making any significant changes.

The one place I've seen a difference is in using "perlbrew".  I wanted to make it so that the Kaldi env.sh file would source a perlbrew Bashrc file, but this fails on some places that use /bin/sh in the shbang.  This is all so I can use a F4DE compliant version of Perl with all the needed mods installed.

-Fred

Daniel Povey

unread,
Mar 27, 2016, 6:06:20 PM3/27/16
to Fred Richardson, kaldi-help
I think we actually changed from the default dash to bash on our debian system.
There are some scripts where it matters, where we use brace expansion.  I forget the exact names, but they are involved in things like discriminative training.

Dan

Daniel Povey

unread,
Apr 28, 2017, 1:17:03 PM4/28/17
to Fred Richardson, kaldi-help
I checked those scripts, it looks like we fixed them.  I removed the warning about dash.
If you have problems, report them and we'll fix them.

Daniel Povey

unread,
Apr 28, 2017, 1:17:40 PM4/28/17
to Fred Richardson, kaldi-help
Sorry, replied to wrong thread (but on the same topic).
Reply all
Reply to author
Forward
0 new messages