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

前端之家收集整理的这篇文章主要介绍了shell脚本中的“#!/ bin / sh”的使用/含义是什么?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
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

原文链接:https://www.f2er.com/bash/386031.html

猜你在找的Bash相关文章