Re: quote removal issues within character class

2019-11-13 Thread Oğuz
Thanks for the explanation. I didn't know any of these

Re: quote removal issues within character class

2019-11-13 Thread Chet Ramey
On 11/8/19 4:50 PM, Oğuz wrote: v=foo echo ${v#[[:"lower":]]} should print oo, but it prints foo instead. This is reproducible on bash 4.4 Plus case foo in (*[![:"lower":]]*) echo bar; esac prints bar, while The idea is that at this point in command processing, quote removal hasn't been

Re: quote removal issues within character class

2019-11-09 Thread L A Walsh
FWIW, Andreas's description really was sufficient...

Re: quote removal issues within character class

2019-11-09 Thread Robert Elz
Date:Sat, 09 Nov 2019 06:46:05 -0800 From:L A Walsh Message-ID: <5dc6d12d.6040...@tlinx.org> | Is this really what the standard says, Yes, I used cut (and then some line length/wrappoing reformatting) | because '\\' is not a character, but 2 characters. In sh,

Re: quote removal issues within character class

2019-11-09 Thread Andreas Schwab
On Nov 09 2019, L A Walsh wrote: > On 2019/11/09 04:49, Robert Elz wrote: >> There's also >> >> The special characters '.', '*', '[', and '\\' >> (, , , and , >> respectively) shall lose their special meaning within a bracket >> expression. >> > > Is this really what

Re: quote removal issues within character class

2019-11-09 Thread Oğuz
You've already answered it, thank you. I didn't know that [:, [., [= were special *sequences*, I guess I overlooked that part. Thanks again for taking time to explain it in detail, I'm grateful 9 Kasım 2019 Cumartesi tarihinde Robert Elz yazdı: > Date:Sat, 9 Nov 2019 07:35:16 +0300

Re: quote removal issues within character class

2019-11-09 Thread L A Walsh
On 2019/11/09 04:49, Robert Elz wrote: > There's also > > The special characters '.', '*', '[', and '\\' > (, , , and , > respectively) shall lose their special meaning within a bracket > expression. > Is this really what the standard says, because '\\' is not a

Re: quote removal issues within character class

2019-11-09 Thread Robert Elz
Date:Sat, 9 Nov 2019 07:35:16 +0300 From:=?UTF-8?B?T8SfdXo=?= Message-ID: | is correct, as "foo" does not contain a ']' which would be required | > to match there (quoting the ':' means there is no character class, | > hence we have instead (the negation of)

Re: quote removal issues within character class

2019-11-08 Thread Oğuz
is correct, as "foo" does not contain a ']' which would be required > to match there (quoting the ':' means there is no character class, > hence we have instead (the negation of) a char class containing '[' ':' > 'l' 'o' 'w' 'e' ';r' (and ':' again), preceded by anything, and > followed by ']' and

Re: quote removal issues within character class

2019-11-08 Thread Robert Elz
Date:Sat, 9 Nov 2019 00:50:52 +0300 From:=?UTF-8?B?T8SfdXo=?= Message-ID: These two | v=foo | echo ${v#[[:"lower":]]} | case foo in (*[![:"lower":]]*) echo bar; esac are because bash believes that the character class name must not be quoted (which is

quote removal issues within character class

2019-11-08 Thread Oğuz
v=foo echo ${v#[[:"lower":]]} should print oo, but it prints foo instead. This is reproducible on bash >4.4 Plus case foo in (*[![:"lower":]]*) echo bar; esac prints bar, while case foo in (*[![":lower":]]*) echo bar; esac doesn't print anything. And this is only reproducible on bash >5.0