Is there any Bash
shebang objectively better than the others for most uses?
(在大多数情况下, Bash
shebang是否客观上比其他人更好?)
-
#!/usr/bin/env bash
-
#!/bin/bash
-
#!/bin/sh
-
#!/bin/sh -
- etc
(等等)
I vaguely recall a long time ago hearing that adding a dash to the end prevents someone passing a command to your script, but can't find any details on that.
(我模糊地回忆起很久以前的一次听说,在最后添加一个破折号可以防止有人将命令传递给你的脚本,但是找不到任何有关它的细节。)
ask by Kurtosis translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…