"However, probably the most interesting extended globbing syntax
is the "!(...)" syntax for matching everything except (ie not
matching). But, be careful, this doesn't always do what you might
expect. For example, let's list all the files that aren't JPEGs or
GIFs. One's first thought might be something like this:
$ ls *!(.jpg|.gif) # wrong, Wrong, WRONG
But that doesn't work because the ".jpg" and the ".gif" of any
file's name end up getting matched by the "*" and the null string
at the end of the file name is the part that ends up not matching
the "!(...)" pattern."
Some of the products that appear on this site are from companies from which QuinStreet receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. QuinStreet does not include all companies or all types of products available in the marketplace.