shell中$#是什么意思
时间: 2023-09-15 12:18:51 浏览: 160
在Shell中,$#表示传递给脚本或函数的参数个数。它用于获取参数的数量,可以帮助脚本或函数根据参数个数进行相应的处理。\[1\]
#### 引用[.reference_title]
- *1* *3* [shell变量$#,$@,$0,$1,$2的含义解释/Shell中的${}、##和%%使用范例](https://blog.csdn.net/chou_kawaii/article/details/128314182)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [shell 脚本中 $$、$#、$? 分别代表什么意思?](https://blog.csdn.net/itworld123/article/details/124875915)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文