Oder daß "word" nicht immer mit einem Wort in natürlicher Sprache
gleichgesetzt werden darf. Ich habe mal ein bischen im Standard gesucht
...
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_446
|3.446 Word
|
|In the shell command language, a token other than an operator. In some
|cases a word is also a portion of a word token: in the various forms of
|parameter expansion, such as ${name-word}, and variable assignment, such
|as name=word, the word is the portion of the token depicted by word. The
|concept of a word is no longer applicable following word expansions-only
|fields remain.
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_01
ist auch ganz interessant, Punkt 2:
|The shell breaks the input into tokens: words and operators; see Token Recognition.
Und bei "Token Recognition" findet man dann bei Punkt 5:
|If the current character is an unquoted '$' or '`', the shell shall
|identify the start of any candidates for parameter expansion (Parameter
|Expansion), command substitution (Command Substitution), or arithmetic
|expansion (Arithmetic Expansion) from their introductory unquoted
|character sequences: '$' or "${", "$(" or '`', and "$((",
|respectively. The shell shall read sufficient input to determine the
|end of the unit to be expanded (as explained in the cited
|sections). While processing the characters, if instances of expansions
|or quoting are found nested within the substitution, the shell shall
|recursively process them in the manner specified for the construct that
|is found. The characters found from the beginning of the substitution
|to its end, allowing for any recursion necessary to recognize embedded
|constructs, shall be included unmodified in the result token, including
|any embedded or enclosing substitution operators or quotes. The token
|shall not be delimited by the end of the substitution.
(
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_03)
Für mich heißt das, das "word" in den diversen Ersetzungen hört mit der
zugehörigen schließenden Klammer auf, und zwar unabhängig von dazwischen
vorkommenden Leerzeichen (gemeint sind Blanks).
Viele Grüße und frohe Feiertage, Thomas