I’m really annoyed by it.
If you pick at random a dozen or so shell scripts in your /usr/bin
directory that start with the interpreter designation of
#!/bin/sh
you will find at least a few of them that use Bash-specific syntax (“bashisms”). And often, it is something as stupid as using
[[ "$string1" = "$string2" ]]
in situations where a perfectly valid POSIX command like
[ "$string1" = "$string2" ]
would suffice. People who do that deserve to be devoured by a giant frog-monster.
On a typical Arch/EndeavourOS install, there are dozens of such examples of scripting malpractice.
Why does Arch not have a guideline that requires every script that uses /bin/sh
as a command interpreter to contain only POSIX-compliant commands?
If you are going to use Bash-specific syntax, just put #!/bin/bash
as the first line of your script and there will be no problem!
It’s so simple, just two little characters: ba.
Now, because of such sloppiness, I can’t use Dash and symlink it to /bin/sh
like on Debian or 'Buntu (at least not without editing dozens of shell scripts on every update). Really annoying.