是什么#$在bash吗? (又名:哈希美元符号,英镑美元符号) [英] What does #$ do in bash? (aka: Hash dollar sign, pound dollar sign)

查看:128
本文介绍了是什么#$在bash吗? (又名:哈希美元符号,英镑美元符号)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我碰到这个前pression在bash脚本来了,它真的不容易谷歌。

I came across this expression in a bash script and it's really not easy to google for.

#$...

感谢您的帮助!

推荐答案

#$ 做一无所有,为开始在同一线路上的评论,一切背后被忽略(与认领的显着的例外)。

#$ does "nothing", as # is starting comment and everything behind it on the same line is ignored (with the notable exception of the "shebang").

$#,因为你有它,打印的传递给shell脚本(比如 $ * 打印所有参数)。

$#, as you had it, prints the number of arguments passed to a shell script (like $* prints all arguments).

这篇关于是什么#$在bash吗? (又名:哈希美元符号,英镑美元符号)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆