I came across the term "word expansion" here:
leave all the other word expansions (
$non_exported_shell_variable
,$1
,$#
,${HOME+x}
,$((1 + 1))
,$(cmd)...)
untouched
I would say that I know what is to expand a variable as with ${HOME}
but what is a "word expansion"?
Perhaps it is an alternative term for "word splitting" (which is by itself an alternative term for "field splitting").
Update
Due to the linked answer's longevity and cognitive biases while first reading it (mostly or only because of lack of knowledge about many concepts mentioned in it then) I didn't internalize a note in it which reads:
Word expansion in this context refers to parameter expansion, arithmetic expansion and command substitution. That doesn't include filename generation (aka globbing or pathname expansion), tilde expansion nor brace expansion (itself not a standard
sh
feature). Using a here-document here makes sure'
and"
s are left untouched, but note that there still is backslash processing.
sh
feature). Using a here-document here makes sure'
and"
s are left untouched, but note that there still is backslash processing. – variable_expander Mar 18 '21 at 11:48