$#  –  Number of Positional Parameters

$# is the number of available positional parameters $1, $2, etc.

Examples

Print number of positional parameters
1
2
set a b c 
echo "$#"
BashSupport Pro 是一款 Bash 和 POSIX 集成开发环境,支持 $# - 立即试用
© 2020–2024 Joachim Ansorg
声明
隐私政策
许可条款