Braces in Bash

xiaoxiao2021-03-06  169

(List) List will be executed in a child shell without an exit value that will affect the current shell.

{list;} You can make a combination command with List will have a new row or ';' Numbers must have a space before and after returning a LIST.

(Expression)) arithmetic calculation

$ {! p} Double parameter $ {! p *} Returns all variables at the beginning $ {p: -word} If the variable P does not exist, return "Word" $ {p: = word} If the variable P does not exist Returns "Word" and set the value of the P:? Word "$ {p:? Word} If the variable P does not exist," Word "is integrated into stderr $ {p: word} If the variable P exists, return" Word "$ {P: 2} Subride $ {P: 2: 3} Subride $ {p # pattern} Returns P starting to delete strings after Pattern, non-greedy mode $ {p ## pattern} Return P start deletion String after Pattern, greed mode $ {p% pattern} Returns the end of PATTERN, non-greed mode $ {p %% pattern} Returns the end of PATTERN to delete strings after Pattern, greed mode $ {P / Pattern / Word} Replace Pattern, Pattern, with "Word" can be added # or%, the table begins or ends $ {p // pattern / word} Replace all Pattern, Pattern, before Patter, the beginning of the table End

$ {

$ (Expression) Returns the value of mathematical expressions $ {list;} Returns the output of the command execution

转载请注明原文地址:https://www.9cbs.com/read-127932.html

New Post(0)