> Will this script ever run anywhere that I don't have the GNU toolchain? Effectively-0% likely.
Not really. A lot of stuff broke when /bin/sh moved to a POSIX-compatibile shell rather than Bash.
Not really. A lot of stuff broke when /bin/sh moved to a POSIX-compatibile shell rather than Bash.
#!/bin/bash wilya@home $ /bin/bash
zsh: no such file or directory: /bin/bash
wilya@home $ which bash
/usr/local/bin/bash
(Yes, I'm annoyed when I see #!/bin/bash, especially on scripts which are otherwise basic enough to be portable everywhere) #!/usr/bin/env bash
Assuming env is installed (I believe I had to install a package on OpenBSD to use it) this will find the first instance of bash in the PATH.