I am not well versed in shell magic, but this one bit me quite a few times because, being on FreeBSD, my bash lives under /usr/local/bin (and I installed it just for the scripts written by other people, too).
I'd like to ask you what can I do with this, ie. how can I modify those scripts so that they work both on my machine and on others'? I don't want (obviously) to symlink bash executable to /bin. I guess that using plain sh, which actually is in /bin wouldn't be good either, because (I suppose) if author wanted bash it was on purpose. How to write shebangs so that they are compatible with Linux and BSD at the same time?
I'd like to ask you what can I do with this, ie. how can I modify those scripts so that they work both on my machine and on others'? I don't want (obviously) to symlink bash executable to /bin. I guess that using plain sh, which actually is in /bin wouldn't be good either, because (I suppose) if author wanted bash it was on purpose. How to write shebangs so that they are compatible with Linux and BSD at the same time?