3 ms·
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, es
by Wilya 14y ago
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)
- dfox 14y agoIt is still better to write #!/bin/bash for bashism using scripts than #!/bin/sh. I recently had to run sed -i (well, another GNUism) 1s%/sh%/bash% on bunch of customer's scripts to make them work on debian. At least when script wants /bin/bash it is going to fail cleanly (and not in the middle after modifying random things) and with mostly meaningful error.