...

/

Declaration Mechanism: Special Parameters

Declaration Mechanism: Special Parameters

Learn how to operate special parameters.

We'll cover the following...

Special parameters

Bash declares special parameters and assigns values to them. It handles them the same way as it does shell variables.

Special parameters pass information from the shell to the launched application, and vice versa. A positional parameter is an example of this kind of Bash variable.

Special parameters

The following table shows frequently used special parameters.

Name Value
$* The string with all positional parameters passed to the script. Parameters start with the $1 variable but not with $0. If we skip the double quotes ($*), Bash inserts each positional parameter as a separate word. With double quotes ("$*"), Bash handles it as one quoted string.
...