:: Re: [DNG] Danger: Debian POSIX host…
Pàgina inicial
Delete this message
Reply to this message
Autor: Rick Moen
Data:  
A: dng
Assumpte: Re: [DNG] Danger: Debian POSIX hostility
Quoting Ian Zimmerman (itz@???):

> I worry about a different kind of portability. If I ever have to switch
> to BSD (and this remains a possibility, unfortunately), /bin/* shebangs
> will not work except for /bin/sh, and /bin/sh is always ash. That is
> because on BSD everything not in the core system goes into /usr/local.


You know, if going for maximum portability, you can rely, within the
shebang, on /usr/bin/env. Like:

#!/usr/bin/env bash

Although there's no absolute guarantee that env(1) will reside in
/usr/bin on all Unix machines ever made, it does live there on BSDs.
And I'm willing to bet that it's going to exist and be in /usr/bin on
Unixes made written the last quarter-century.

https://stackoverflow.com/questions/10376206/what-is-the-preferred-bash-shebang#10383546