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

Shell变量$#,$@,$0,$1,$2

发布时间:2020-12-15 16:31:11 所属栏目:安全 来源:网络整理
导读:The Linux Documentation Project (LDP) is working on developing good,reliable documentation for the Linux operating system. The overall goal of the LDP is to collaborate in taking care of all of the issues of Linux documentation,ranging fro

The Linux Documentation Project (LDP) is working on developing good,reliable documentation for the Linux operating system. The overall goal of the LDP is to collaborate in taking care of all of the issues of Linux documentation,ranging from online documentation (man pages,HTML,and so on) to printed manuals covering topics such as installing,using,and running Linux. Here is the Linux Documentation Project Manifesto and Copyright License for LDP works.

http://www.tldp.org/LDP/abs/abs-guide.pdf

  • $$

    Shell本身的PID(ProcessID)

  • $!

    Shell最后运行的后台Process的PID

  • $?

    最后运行的命令的结束代码(返回值)

  • $*

    所有参数列表,字串形式

  • $@

    所有参数列表,数组形式

  • $#

    添加到Shell的参数个数

  • $0

    Shell本身的文件名

  • $1

    添加到Shell的第一个参数

(编辑:李大同)

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

    推荐文章
      热点阅读