Bash - Expansion

Bash Liste Des Attaques Ovh

About

This article is about expansion in Bash.

An expansion is the replacement of a special token in your code by the result of the expansion during code execution.

It's performed on the command line after it has been split into words. See Bash - Command Execution

There are seven kinds of expansion performed:

Order

The order of expansions is:

  • brace expansion,
  • tilde expansion,
  • parameter expansion,
  • variable expansion
  • arithmetic expansion
  • and command substitution (done in a left-to-right fashion),
  • word splitting,
  • and pathname expansion.

On systems that can support it, there is an additional expansion available:

  • process substitution.

Word change

Expansions can be use to change the number of word (token) processed. See Shell - (Word|Token)





Discover More
Bash Liste Des Attaques Ovh
Bash - Brace Expansion {} (Data Generation)

Brace expansion is a mechanism by which arbitrary strings may be generated. This mechanism is similar to pathname expansion, but the filenames generated need not exist. Patterns to be brace expanded...
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 - (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 - Case

The case control statement execute commands based on regular expression pattern matching. Initscript example: Selectively execute COMMANDS based upon WORD matching glob PATTERN. The | is used to...
Bash Liste Des Attaques Ovh
Bash - Colon (:) Builtin command

The : builtin command does nothing beyond: expanding its arguments and performing any specified redirections. A zero exit code is returned.
Bash Liste Des Attaques Ovh
Bash - Here Documents

in Bash. Here document in Bash is implemented through redirection. A redirection instructs the shell to read input from the current source until a line containing only word (with no trailing blanks)...
Bash Liste Des Attaques Ovh
Bash - History Expansion

History expansion
Bash Liste Des Attaques Ovh
Bash - Parameter Expansion ${

Parameter expansion are patterns applied to the parameters that have different results. Same as ?? See also: The value of parameter is substituted where: the braces are optional. They served...
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
Bash - Special Parameter

Special parameters are Parameters treated specially. metacharacter ?? These parameters may only be referenced; assignment to them is not allowed. Positional parameter expansion Star () At...



Share this page:
Follow us:
Task Runner