Re: Probably not a bug but I was surprised: $' does not work inside "..." close.

2021-03-18 Thread Dale R. Worley
Greg Wooledge writes: > $'...' is a form of quoting, not an expansion. It won't "work" inside > of another type of quoting, just like '...' will not "work" inside "...". Yes, that's true, and makes sense when I think about it. But the manual page doesn't consistently phrase it that way:

Re: Probably not a bug but I was surprised: $' does not work inside "..." close.

2021-03-18 Thread Greg Wooledge
On Wed, Mar 17, 2021 at 09:11:48PM -0400, Dale R. Worley wrote: > I have it encoded in my head that $ inside "..." is respected. Subtly, > the $'...' construction is not respected inside "...". Bash has 5 types of quoting: '...', "...", $'...', $"..." and backslash. $'...' is a form of quoting,

Probably not a bug but I was surprised: $' does not work inside "..." close.

2021-03-17 Thread Dale R. Worley
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