I would have coded it this way:
/usr/bin/rm -v `ls -1|egrep -ve '(^ZMAT|^out|^Out|^GENBAS|^Note)'`

And bash is a shell, but you mean a script.  Likely in interactive bash the
* are getting expanded so you might have to use noglob to suppress it or
something similar.

Or you might have to use a single quote to suppress the expansion so that
rm gets the *, otherwise the shell expands the * and rm gets a list of
files.
_______________________________________________
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