help-bash
[Top][All Lists]
Advanced

[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!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]