shell脚本中的“#!/ bin / sh”的使用/含义是什么?请让我知道在脚本中是否被考虑,因为它被评论.
The sha-bang ( #!) [1] at the head of a script tells your system that this file is a set of commands to be fed to the command interpreter indicated. The #! is actually a two-byte [2] magic number,a special marker that designates a file type,or in this case an executable shell script (type man magic for more details on this fascinating topic). Immediately following the sha-bang is a path name. This is the path to the program that interprets the commands in the script,whether it be a shell,a programming language,or a utility. This command interpreter then executes the commands in the script,starting at the top (the line following the sha-bang line),and ignoring comments. [3]
资料来源:http://tldp.org/LDP/abs/html/sha-bang.html#MAGNUMREF
(编辑:李大同)
【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!
|