A little more verbosity on the advice might have helped. I wouldn't have properly understood you were saying without @peatmoss's reply. So without the context, your original comment just seemed like knee-jerk bash-bashing.
I've encountered many scripts written by developers on Fedora that totally fail over when run on Ubuntu specifically due to using #!/bin/sh when they really required #!/bin/bash.
I specifically said "Write clean, posix-compliant shell scripts"
Do the same developers write Java code in a .cpp file and wonder why it doesn't work? Or put <?php tags in a .erb template?
Yes, you need to test to make sure that you wrote the correct things.
* https://wiki.ubuntu.com/DashAsBinSh
* https://wiki.ubuntu.com/DashAsBinSh/Spec
* https://lists.debian.org/debian-release/2007/07/msg00027.htm...
If more people used #!/usr/bin/env bash, it wouldn't be that big of a deal.
If they wrote posix compatible shell scripts it wouldn't be any big deal because they'd just work.
Can you cite some sources here? No one knows what you're talking about.
Many people, especially Solaris and BSD folk, don't like bash scripts, and want you to write shell scripts in Bourne shell instead.
Many other people, who code on OS X and deploy on Linux, enjoy the extras bash adds, and only deploy on platforms that include bash.
Also, just because you may not know what I'm talking about, don't assume no-one else does.
Friends don't let friends write shell scripts targeting bash.
For context: Bash is not available|installed everywhere, and has some inter-version weirdness.
Write clean, posix-compliant shell scripts (i.e. target /bin/sh commonly referred to as bourne shell) and you're in a much better position.
On Debian your script will be run by Dash, on OS X it will be run by Bash, on Ubuntu or RedHat it could be different again, but the point is, they are specifically running in POSIX mode, so that you get reliable, reproducible results across systems and even across Bash versions.