On 12/14/2012 11:29 PM, gregrwm wrote:

well what i actually wanted was to conjure an expression that selected
a small few files, and then invert the expression, in particular i
wanted to isolate all 2 letter names plus a few other names, and then
invert, so that the aforementioned were not in the selection.  perhaps
that's just a tad beyond what a bash expression can do (without
writing a loop)?

(shopt -s extglob)

echo !(??|foo|bar)

or if you want to loop over those files, "for FILE in !(??|foo|bar); do echo "$FILE"; done" and so on.

Rene.


Reply via email to