[jwesterd@jwesterd-f33 aaa]$ ls -1
a
b
c
d
e
f
[jwesterd@jwesterd-f33 aaa]$ /usr/bin/rm -v !(a*|b*|c*|d*|e*)
removed 'f'
[jwesterd@jwesterd-f33 aaa]$ ls -1
a
b
c
d
e
a
b
c
d
e
f
[jwesterd@jwesterd-f33 aaa]$ /usr/bin/rm -v !(a*|b*|c*|d*|e*)
removed 'f'
[jwesterd@jwesterd-f33 aaa]$ ls -1
a
b
c
d
e
[jwesterd@jwesterd-f33 aaa]$ echo $0
bash
bash
seems to work?
Are there asterisks or quotes in the files you are affecting?
Cheers
John Westerdale
Sr Container Consultant RHCSA-8.2
Red Hat NYC Office/WFH
M: 201-376-9993 IM: jwesterd He / Him / His
On Fri, Jun 4, 2021 at 2:27 PM Patrick Dupre <pdupre@xxxxxxx> wrote:
Hello,
Sorry, I am a bit of list
This command line works in a shell, but not in a bash
I may miss some quotes !
Thanks for your help.
/usr/bin/rm -v !(ZMAT*|out*|Out*|GENBAS|Note*)
===========================================================================
Patrick DUPRÉ | | email: pdupre@xxxxxxx
Laboratoire interdisciplinaire Carnot de Bourgogne
9 Avenue Alain Savary, BP 47870, 21078 DIJON Cedex FRANCE
Tel: +33 (0)380395988 | | Room# D114A
===========================================================================
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
_______________________________________________ users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure