What Is Called in Unix?
Contents What Is $# in Unix? $# Is a Special Variable in Bash, That Expands to the Number of Arguments (Positional Parameters) I. E. $1, $2 … Passed to the...
Contents
What is $# in Unix?
$# is a special variable in bash , that expands to the number of arguments (positional parameters) i.e. $1, $2 … passed to the script in question or the shell in case of argument directly passed to the shell e.g. in bash -c ‘…’ …. .
What is $- in bash?
$- $- (dollar hyphen) bash parameter is used to get current option flags specified during the invocation, by the set built-in command or set by the bash shell itself.