在我见过的大多数 shell 脚本中(除了我自己没有写的脚本),我注意到 shebang 设置为#!/bin/sh. 这在旧脚本上并没有让我感到惊讶,但在相当新的脚本上也是如此。
#!/bin/sh
是否有任何理由宁愿/bin/sh过/bin/bash,因为bash几乎是无处不在的,而且往往默认情况下,许多Linux和BSD的机器回去了十多年?
/bin/sh
/bin/bash
bash
shell bash history shebang
bash ×1
history ×1
shebang ×1
shell ×1