[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
[jwesterd@jwesterd-f33 aaa]$ echo $0
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 <https://www.redhat.com/> NYC Office/WFH

john.westerd...@redhat.com

M: 201-376-9993     IM: jwesterd   He / Him / His
<https://www.redhat.com/>

I respect your Life-Work balance.

No need to respond immediately if you receive this outside your normal
working hours.


On Fri, Jun 4, 2021 at 2:27 PM Patrick Dupre <pdu...@gmx.com> 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: pdu...@gmx.com
>  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@lists.fedoraproject.org
> To unsubscribe send an email to users-le...@lists.fedoraproject.org
> 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@lists.fedoraproject.org
> Do not reply to spam on the list, report it:
> https://pagure.io/fedora-infrastructure
>
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
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@lists.fedoraproject.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure

Reply via email to