Experimental: Change shebang from #!/bin/bash to #!/usr/bin/env bash.
Not sure this is a good idea, since it relies on the /usr/bin/env
being the absolute path to 'env', and also that the UNIX variants
and Linux distros agree on hte location of 'env'. It's 100% reliably
either /bin/env or /usr/bin/env. Alas, the shebang line can't
exercise logic to check; the shebang line reference a single
hard-coded path.
Some considerations:
* As of this writing, Mac OSX "Big Sur" 11.2 stubbornly still ships
with the outdated-by-a-decade bash 3.x, without support for key
features like associative arrays and thus useless (and insecure, too).
* OSX Support would be a (very) nice-to-have, but not a hard
requirement. If we stick with a shebang of #!/bin/bash, it will work
OK on all required platforms (where bash is 4.x or 5.x), and only
require manual operational idiosyncracies on Mac (.e.g. running
"bash dsi" to get the one in /usr/local/bin/bash installed with
brew, which is a modern and useful 5.x. And one day, it will
magically start working on OSX assuming Apple eventually ships with
a modern bash. (If they did, we wouldn't need to think about this).
* The choice of #!/bin/bash vs. #!/usr/bin/env bash is a matter
of priority. Do we want portability to more systems (preferring
#!/usr/bin/env) or more predictable behavior on a given system
or system of a known platform (preferring #!/bin/bash).
* The checks for $BASH_VERSION in the code already prevent issues
unexpectedly inconsistent results; that will work with either
#!/bin/bash or #!/usr/bin/env bash.
* That a /bin/bash of some version will exist is a safe assumption;
any system for which that isn't true isn't something we need to
support.