bash - #$ 在 bash 中做什么? (又名 : Hash dollar sign, 英镑美元符号)

标签 bash shell

我在 bash 脚本中遇到了这个表达式,用谷歌搜索真的不容易。

#$...

最佳答案

#$ 做“什么都不做”,因为 # 是开始注释并且在同一行后面的所有内容都被忽略(明显的异常(exception)是 "shebang" ) .

$# 打印传递给 shell 脚本的参数数量(如 $* 打印所有参数)。

关于bash - #$ 在 bash 中做什么? (又名 : Hash dollar sign, 英镑美元符号),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9630203/

相关文章:

java - 在 Windows 上使用 exec-maven-plugin 执行 shell 脚本

linux - 打印 'find' linux 命令找到匹配项的目录

linux - awk打印所需数量的字段

python - 使用 urllib2 和/或 wget 自动下载文件

bash - (unix shell 脚本)解压多个 zip 文件,在 zip 文件名后重命名解压文件

shell - 未找到 neo4j-shell-tools、neo4j-shell 自动索引和导入命令

ruby - 在 ruby​​ 中运行 shell 命令,将 STDIN 附加到命令输入

bash - 确定连接是有线还是无线?

bash - 是什么导致 "Directory not empty"错误?

json - 如何从 linux shell 脚本中的 json 键值对获取值