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.