$#
–
Number of Positional Parameters
$#
is the number of available positional parameters $1
, $2
, etc.
Links
Examples
- Print number of positional parameters
1 2
set a b c echo "$#"
BashSupport Pro is a Bash and POSIX IDE with support for $# – try it now!