bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to create bash-pattern to exclude a matching param in param expansio


From: Linda Walsh
Subject: How to create bash-pattern to exclude a matching param in param expansion&matching?
Date: Mon, 28 Oct 2013 15:35:08 -0700
User-agent: Thunderbird

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?

Thanks!








reply via email to

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