Portability of shell scripts from other *nixes
doug at polands.org
Wed Jan 25 23:52:23 UTC 2012
I'm trying port some shell scripts to FreeBSD that were originally
written on Darwin (OS X).
The issue I'm having is the shebang line of the scripts in OS X is
#!/bin/sh, and it turns out that is really an instance of bash, and
the code contains some bashisms. On FreeBSD I have bash in
Is there an "easy/best" way to have a single shebang that works on
both OS's? I'd rather not change FreeBSD's bourne shell to bash with
any symlinking of /usr/local/bin/bash to /bin/sh.
More information about the freebsd-questions