[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bookworm: dash shell globs don't recognise [^...] to negate a character class



On Fri, Apr 14, 2023 at 11:02:03PM -0400, Greg Wooledge wrote:
> On Sat, Apr 15, 2023 at 09:44:03AM +0700, Max Nikulin wrote:
> > As to [^c] vs. [!c], unfortunately the latter can not be always used as
> > portable variant. It is treated as history expansion in the case of
> > interactive bash session.
> 
> Ugh.  That abomination.  I've had history expansion disabled for *years*.

You have to escape it with a backslash. Quoting with single quotes also
helps, although I don't know whether that is portable itself.

Yes, somewhat annoying, unless one's making use of it.

Cheers
-- 
t

Attachment: signature.asc
Description: PGP signature


Reply to: