[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Probably not a bug but I was surprised: $' does not work inside "..." cl
Dale R. Worley
Probably not a bug but I was surprised: $' does not work inside "..." close.
Wed, 17 Mar 2021 21:11:48 -0400
I have it encoded in my head that $ inside "..." is respected. Subtly,
the $'...' construction is not respected inside "...". After reading
the manual page carefully, I realized this is because the interpretation
of $'...' is not part of parameter expansion (despite its $) but rather
it is a special form of quote interpretation, "Words of the form
$'string' are treated specially."
However, I'm not sure that text is entirely accurate, either, as
$ echo xxx$'aa\ta'yyy
"Word" is generally used to mean non-space characters (separted by
spaces), but the argument of "echo" is only one word, which is not, as a
whole, of the form $'...'.
- Probably not a bug but I was surprised: $' does not work inside "..." close.,
Dale R. Worley <=