bash syntax
Contents
evaluating expression
1. shell expansion
-
brace expansion
1 2 3 4 5
a{b,c,d} # ab ac ad a{1..2} #a1,a2 1 a{1..5..2} #a1,a3
-
parameter expansion
1 2
${parameter}; $parameter
-
output command
|
|
other
double quote vs single quote, curly bracket, parenthese
-
quote:
‘’: keep word literal meaning “”: expand $,,`1 2
echo "$(echo hello)" # hello echo '$(echo hello)' # '$(echo hello)'