[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Question about case statement in Bash docs
From: |
Greg Wooledge |
Subject: |
Re: Question about case statement in Bash docs |
Date: |
Mon, 10 May 2021 09:47:08 -0400 |
On Mon, May 10, 2021 at 09:12:33PM +1000, AlvinSeville7cf wrote:
> x=test
> case $x in
> "test") echo Y
> esac
>
> Pattern is quoted but no quote removal is performed according to docs.
Quote removal is essential, because of the way the empty string
is matched:
case $foo in
"") echo "foo is empty";;
...
So, it may be a documentation omission, or maybe it's mentioned in some
other paragraph, but either way quote removal definitely happens here.
Re: Question about case statement in Bash docs, Chet Ramey, 2021/05/10