[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Context sensitivity of the word "parameter" in the section of "Parameter
From: |
Peng Yu |
Subject: |
Context sensitivity of the word "parameter" in the section of "Parameter Expansion" |
Date: |
Sun, 9 May 2021 10:59:54 -0500 |
Hi,
In the following paragraph in the manual, "parameter" in
"${parameter}" could be "!".
"""
${parameter}
The value of parameter is substituted. ...
"""
However, "parameter" in "${#parameter}" can not be "!".
"""
${#parameter}
Parameter length. ...
"""
$ echo "${!}"
57766
$ echo "${#!}"
-bash: !}: event not found
So the word "parameter" in "${parameter}" and "${#parameter}" is not
the exactly same. Should this be made clearer in the manual?
I have not checked "parameter" in all the cases in this section. But I
guess the word "parameter" in the whole section should be check for
ambiguity like this?
This sentence is also not precise. ${!} obviously satisfies that the
first character is "!" and it is not a nameref. Yet ${!} is just the
process ID instead of a level of indirection.
" If the first character of parameter is an exclamation point (!), and
parameter is not a nameref, it introduces a level of indirection."
--
Regards,
Peng
- Context sensitivity of the word "parameter" in the section of "Parameter Expansion",
Peng Yu <=
- Re: Context sensitivity of the word "parameter" in the section of "Parameter Expansion", Eli Schwartz, 2021/05/09
- Re: Context sensitivity of the word "parameter" in the section of "Parameter Expansion", Peng Yu, 2021/05/09
- Re: Context sensitivity of the word "parameter" in the section of "Parameter Expansion", Eli Schwartz, 2021/05/09
- Re: Context sensitivity of the word "parameter" in the section of "Parameter Expansion", Peng Yu, 2021/05/09
- Re: Context sensitivity of the word "parameter" in the section of "Parameter Expansion", Lawrence Velázquez, 2021/05/09
- Re: Context sensitivity of the word "parameter" in the section of "Parameter Expansion", Peng Yu, 2021/05/09
- Re: Context sensitivity of the word "parameter" in the section of "Parameter Expansion", Chris Elvidge, 2021/05/10
- Re: Context sensitivity of the word "parameter" in the section of "Parameter Expansion", Chris Elvidge, 2021/05/10
- Re: Context sensitivity of the word "parameter" in the section of "Parameter Expansion", Peng Yu, 2021/05/10