Extended Globbing
Much like the order of operations in mathematics, Bash evaluates these shell expansions in a specific order.
Brace Expansion
{1..8}
Tilde Expansion
~/
Parameter Expansion
$USER , $USERID
Variable Expansion
$(who | tail -n10 | awk '{print $2}')
Arithmetic Expansion & Command Substitution (left to right)
$(($USERID + 12 ))
Word Splitting
Filename Expansion
.*
Quote Removal
"$USER"
ENABLING EXTENDED GLOBBING
shopt -s extglob
LEARNNN
Last updated