[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 Sat, Apr 15, 2023 at 11:02:12AM +0000, davidson wrote:
> On Sat, 15 Apr 2023 Max Nikulin wrote:
> > The problem is to prevent history expansion while keeping pattern
> > matching (glob) active.
> > 
> >   du -ks -- .[!.]* | sort -n | tail
> 
> Are there versions of bash that exhibit history expansion in the
> example above?

Not that I've found.  I tried 3.2 and 2.05b and they're both fine.

unicorn:~$ bash-2.05b
unicorn:~$ set -H
unicorn:~$ !xyz
bash-2.05b: !xyz: event not found
unicorn:~$ du -ks -- .[!.]* | sort -n | tail
101208  .mozilla
136244  .t-engine
171952  .kolproxy
180180  .old-crufty-mozilla
222572  .local
442240  .vscode
991928  .config
1047780 .nuget
1476376 .cache
5798668 .steam


Reply to: