aight yea i saw ..
On Fri, Nov 1, 2024, 06:17 Lawrence Velázquez <vq@larryv.me> wrote:
> On Fri, Nov 1, 2024, at 1:00 AM, #!microsuxx wrote:
> > ~ $ m=a\|b ; case b in $m) echo ye ; esac
> > ~ $ m=a\|b ; case b in a|b) echo ye ; esac
> > ye
> >
> > so vars like a|b dont work ?
>
> Well, they do "work", they just don't result in multiple patterns.
> Patterns undergo parameter expansion, but the results of expansions
> are not reparsed to determine new patterns. It's conceptually the
> same reason that this only runs echo once:
>
> $ var='echo hi; echo bye'
> $ $var
> hi; echo bye
>
>
>https://www.gnu.org/software/bash/manual/html_node/Conditional-Constructs.html#index-case
>
> --
> vq
>