greycat 1169486070 learn shopt -s extglob; NO_JPEGS=(!(*.jpg)); shopt -u extglob; for x in "${NO_JPEGS[@]}"; do ... greycat 1169486169 forget greycat 1169486182 learn shopt -s extglob (Hit Enter here. A semicolon won't work!) NO_JPEGS=(!(*.jpg)); shopt -u extglob; for x in "${NO_JPEGS[@]}"; do ... greycat 1200582630 forget greycat 1200582664 learn "Extended globs" (shopt -s extglob) allow you do to things like "all files that do not end in .jpg". See http://wooledge.org/mywiki/glob greycat 1200582678 forget greycat 1200582684 learn "Extended globs" (shopt -s extglob) allow you to say things like "all files that do not end in .jpg". See http://wooledge.org/mywiki/glob geirha 1357713063 forget geirha 1357713077 learn "Extended globs" (shopt -s extglob) allow you to say things like "all files that do not end in .jpg". See http://mywiki.wooledge.org/glob#extglob