Bash - Special Parameter

Bash Liste Des Attaques Ovh


Special parameters are Parameters treated specially. metacharacter ??

These parameters may only be referenced; assignment to them is not allowed.


Positional parameters Expansion

Positional parameter expansion

  • Star (*)
  • At (@)
  • Hash (#)

Exist Status

? expands to the status of the most recently executed foreground pipeline.

echo $?
0 # All good

Shell Option

- expands to the current option flags. See Bash - Shell Option (Shopt)

echo $-


Dollar ($)

$ expands to the process ID of the shell. In a () subshell, it expands to the process ID of the current shell, not the subshell.

echo $$

Exclamation mark (!)

! expands to the process ID of the most recently executed background (asynchronous) command.


0 Expands to the name of the shell or shell script.


_ At shell startup, set to the absolute pathname used to invoke the shell or shell script being executed as passed in the environment or argument list.

Subsequently, expands to the last argument to the previous command, after expansion. Also set to the full pathname used to invoke each command executed and placed in the environment exported to that command. When checking mail, this parameter holds the name of the mail file currently being checked.

Discover More
Bash Liste Des Attaques Ovh
Bash - (Argument|Positional Parameter)

An argument is a parameter given: to a command to a function or to the bash shell They are referenced by position. A positional parameter is a parameter denoted: by one or more digits, ...
Bash Liste Des Attaques Ovh
Bash - (Environment) Variable

A variable is a parameters referenced by a name. parameter A variable has: a value and zero or more attributes (such as integer, ...). Attributes are assigned using the declare builtin command....
Bash Liste Des Attaques Ovh
Bash - (Return|Exit) (Value|Status)

The return status (also known as Exit Status of Exit Code) of a simple command is its exit status as provided by: the posix 1003.1 waitpid function, or 128+n if the command was terminated by signal...
Bash Liste Des Attaques Ovh
Bash - Interactive Shell

An interactive shell is when bash is: started: without non-optionarguments without the -c option whose standard input and error are both connected to terminals (as determined by isatty(3)),...
Bash Liste Des Attaques Ovh
Bash - Script

This page is Os Shell scripts (with a accent on the Bash shell) A Bash or Shell Script is a text file that: has a shebang has the executable permission. File extensions are meaningless in UNIX,...
Bash Liste Des Attaques Ovh
Bash - Shell Option (Shopt)

Shell option are the option of the shell Shell option can be specified upon invocation, by: the set builtin command, or those set by the shell itself (such as the -i option). The special...
Bash Liste Des Attaques Ovh
How to use the Array Variable in Bash?

Bash provides a one-dimensional array variables. See also: When calling a function, quote the variable otherwise bash will not see the string as atomic. The separator is variable $IFS. There is: ...
Linux - Shell

in Linux context The valid shell for a distribution are listed in the /etc/shells Several type of unix_shell have been developed: Bourne (sh), Bash (Bourne-Again Shell), Almquist_shelldash...
Bash Liste Des Attaques Ovh
Sh - Special Characters

special character See also: special Parameters the point: >, >>, |, < : the tilde (~): the user directory home $?: the exist status $$: the PID of the parent process ...

Share this page:
Follow us:
Task Runner