On Wed, Jan 12, 2022 at 03:36:05PM +0100, Christoph Anton Mitterer wrote:
> On Wed, 2022-01-12 at 07:38 -0500, Greg Wooledge wrote:
> > Presumably your system is using one of the older versions of dash.Â
>
> Well my original tests were all with Debian sid's:
> bash 5.1
> busybox 1.30.1
> dash 0.5.11+git20210903+057cd650a4ed
> klibc-utils 2.0.10
Debian 11 has dash version 0.5.11+git20200708+dd9ef66-5 -- maybe the
behavior changed again? This happens a lot in shells.
unicorn:~$ dash
$ case a in [^.a]) echo match;; *) echo not;; esac
not
$ case a in ['^.a']) echo match;; *) echo not;; esac
not
$ case a in [!.a]) echo match;; *) echo not;; esac
not
$ case a in ['!.a']) echo match;; *) echo not;; esac
match
Aha, so the quotes *do* matter... sometimes!