On Mon, 28 Oct 2013, Linda Walsh wrote:
I am missing how to create a bash-pattern that excludes a specific pattern.
I.e. to ignore any file with '-IGN-' somewhere in the filename.
The best I've come up with so far has been to use shell to build
a pattern, but I know it is limited in functionality. I.e.:
ls !($(echo *+(-IGN-)*|tr " " "|"))
I tried the above in a dir that has 2 files w/the pattern, and
532 w/o, and it worked, but how much of that was 'luck'?
Is there a better bash-pattern that doesn't use tr and such?
ls !(*-IGN-*)
--
Chris F.A. Johnson, <http://cfajohnson.com/>