Ниже приведен список специальных переменных, предоставляемых оболочкой, которые вы можете напрямую использовать в сценарии оболочки.
Variable Variable Details
$# : Total number of arguments passed to script
$0 : Script name itself
$1 to $n : $1 for the first arguments, $2 for second argument till $n for n’th arguments. From 10’th argument, we must enclose them in curly braces eg. ${10}, ${11}
$* : Values of all the arguments. All agruments are double quoted
$@ : Values of all the arguments
$? : Exit status id of last command
$$ : Process ID of current shell
$! : Process id of last command