加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

shell脚本中的“#!/ bin / sh”的使用/含义是什么?

发布时间:2020-12-15 18:41:33 所属栏目:安全 来源:网络整理
导读: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
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

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读