[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How Bash can delete wildcard with exceptions
From: |
Budi |
Subject: |
How Bash can delete wildcard with exceptions |
Date: |
Sat, 1 Jul 2023 16:34:08 +0700 |
How Bash can delete wildcard with exceptions e.g. deletion below
except delete FOO.BAR
$ ls
BOO.BAR
MOO.BAR
COO.BAR
FOO.BAR
JOO.BAR
NOO.BAR
ZOO.BAR
BOO.BAZ
MOO.BAZ
COO.BAZ
JOO.BAZ
FOO.BAZ
NOO.BAZ
ZOO.BAZ
tried:
$ shopt -s extglob globstar
$ rm *.BAR !(FOO.BAR)
not work, it wiped all! Help!
- How Bash can delete wildcard with exceptions,
Budi <=