--- layout: page category-page: scripts category-title: Scripting tags: variables special $ ! author: Dario Rasic title: Script Special Variables previous-page: pages/scripts/1-variables.html next-page: pages/scripts/3-parameter_expansion.html --- There are certain strings that we can't use in the variable-naming process.
In this page we will see what those strings are, and what their purpose is.

$$

To begin, we look at the simplest variable, which is the dollar sign ($). This command simply gives us the process ID of the current shell.
echo $$
    11480

$0

This variable simply gives us the filename of the current script.

$n

This variable corresponds to the arguments with which a script was invoked. Here n is a positive number corresponding to the position of an argument.

$#

This variable gives us the number of arguments supplied to a script.

$!

This variable gives us the process ID of the last background command.