Linux Shell
  • Standard
Standard Version Description
POSIX 1003.2(ISO/IEC 9945-2) 1992, 1988 the shell and the standard utilities
POSIX 1003.2a (User Portability Extensions, UPE) standards of interactive shell use and interactive utilities like the vi editor
Feature Syntax Description Contributor
variable assignment varname=value
environment variable export varname or export varname=value varname=value command for variables to be in the environment of a particular subprocess (command) only
brace expansion For example, a{b,c} becomes ab ac C shell
tilde(~) expansion C shell
variable substitution(variable expansion or parameter substitution) $varname or ${varname}
command substitution $(…) or `…`
arithmetic expression(arithmetic expansion) `expr …` or let … or ((…))
pathname expansion(wildcard expansion or filename expansion) * or ? or […]
process substitute <(list) or >(list)
condition test [...] or test … tests whether the exit status of a list of commands is 0 (since 0 means "success" by UNIX convention)
extended condition test [[...]] No filename expansion or word splitting takes place between [[ and ]], but there is parameter expansion and command substitution Korn shell
arithmetic condition test ((…)) or let … return an exit status of 0 if the arithmetic expressions they evaluate expand to a non-zero
quoting
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License