2557 shaares
671 liens privés
671 liens privés
1 résultat
taggé
variable
Un petit rappel des variables spéciales de Bash.
Here's quick look into the special variables you get in bash shell:
Special Variable | Description |
---|---|
$0 |
Gets the name of the current script. |
$# |
Gets the number of arguments passed while executing the bash script. |
$* |
Gives you a string containing every command-line argument. |
$@ |
It stores the list of every command-line argument as an array. |
$1-$9 |
Stores the first 9 arguments. |
$? |
Gets the status of the last command or the most recently executed process. |
$! |
Shows the process ID of the last background command. |
$$ |
Gets the process ID of the current shell. |
$- |
It will print the current set of options in your current shell. |