On Thu, Feb 10, Johannes Meixner wrote:
Hello,
On 2022-02-10 09:11, John Paul Adrian Glaubitz wrote:
Using dash as the default shell is meant to help avoid bashisms, i.e. bash-specific shell code which would break on other shells if a user decided to replace bash as their default shell.
Is "#!/bin/bash" no longer supported?
Of course it is. There are many features of bash which do not exist in a POSIX conform sh and for which is no replacement available. But you have to use "#!/bin/bash" if you use such features, using "#!/bin/sh" and expect that bash features work is plain wrong.
How does using a non-bash shell avoid bashisms?
Because your script stops working until you fix it to either: - use /bin/bash - remove the bashism.
I think using a non-bash shell causes errors at the user for scripts that use bashisms without proper shebang i.e. end users get errors for faults of others. Not really end user friendly.
Depends on from which angle you are looking at this. There are enough cases where you don't have bash available and you have to use a POSIX shell, even for Tumbleweed. For this users (which are not the Tumbleweed Desktop users, I agree), it is really helpful and very user friendly. Thorsten
But strictly technically right - of course - yeah!
Kind Regards Johannes Meixner -- SUSE Software Solutions Germany GmbH Maxfeldstr. 5 - 90409 Nuernberg - Germany (HRB 36809, AG Nuernberg) GF: Ivo Totev
-- Thorsten Kukuk, Distinguished Engineer, Senior Architect SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nuernberg, Germany Managing Director: Ivo Totev (HRB 36809, AG Nürnberg)