[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: case $var in $list) issue
From: |
#!microsuxx |
Subject: |
Re: case $var in $list) issue |
Date: |
Fri, 1 Nov 2024 12:21:59 +0100 |
id say its a must functionality
i imagine case without such .. u couldnt programmaticly use it at all
m='@(a|b)' m2=c$m ; case ca in $m2) echo ye ; esac
ye
On Fri, Nov 1, 2024, 12:17 #!microsuxx <fxmbsw7@gmail.com> wrote:
>
>
> On Fri, Nov 1, 2024, 12:16 Greg Wooledge <greg@wooledge.org> wrote:
>
>> On Fri, Nov 01, 2024 at 06:00:49 +0100, #!microsuxx wrote:
>> > shopt -s extglob
>> > m='@(a|b)' ; case b in $m) echo ye ; esac
>> > ye
>>
>> Huh, interesting indeed.
>>
>> hobbit:~$ shopt -s extglob
>> hobbit:~$ m='a|b'
>> hobbit:~$ case b in $m) echo ye ; esac
>> hobbit:~$ m='@(a|b)'
>> hobbit:~$ case b in $m) echo ye ; esac
>> ye
>>
>> I can only speculate that it sometimes re-parses the contents of $m
>> based on the first character.
>>
>
> ?
>
>>