Sorry, the headline might be a bit irritating, but I didn\'t know anything better. Anyway, I want a bash script to work on FreeBSD, OpenBSD and Linux without modifying it, but b
Using env in the shebang (#!/usr/bin/env bash) should make the script OS agnostic.
env
#!/usr/bin/env bash