igli 1186232327 learn nullglob is one of the most useful shell options (help shopt) which stops non-matching globs from expanding to the pattern. eg: shopt -s nullglob; dir=~; for i in *.doc *.txt; do echo cp "'$i'" "'$dir'"; done greycat 1196091395 forget greycat 1196091461 learn nullglob: a shell option (shopt) which causes unmatched globs to expand to nothing, rather than themselves. Example: shopt -s nullglob; mp3s=(*.mp3); for f in "${mp3s[@]}"; do mp3info .... "$f"; done greycat 1196091501 forget greycat 1196091522 learn nullglob: a shell option (shopt) which causes unmatched globs to expand to nothing, rather than themselves. Example: shopt -s nullglob; files=(*); echo "There are ${#files[*]} files." e36freak 1305518861 forget e36freak 1305518914 learn nullglob: a shell option (shopt) which causes unmatched globs to expand to nothing, rather than themselves. Example: shopt -s nullglob; files=(*); echo "There are ${#files[@]} files." ormaaj 1351117216 forget ormaaj 1351117387 learn Causes unmatched globs to expand to nothing rather than themselves. shopt -s extglob; files=(*); echo "There are ${#files[@]} files." - see: http://mywiki.wooledge.org/NullGlob cthuluh 1351550536 forget cthuluh 1351550563 learn Causes unmatched globs to expand to nothing rather than themselves. shopt -s nullglob; files=(*); echo "There are ${#files[@]} files." - see: http://mywiki.wooledge.org/NullGlob izabera 1423591587 forget izabera 1423591617 learn Causes unmatched globs to expand to nothing rather than themselves. shopt -s nullglob; <> files=(*); echo "There are ${#files[@]} files." - see: http://mywiki.wooledge.org/NullGlob izabera 1423591691 forget izabera 1423591697 learn Causes unmatched globs to expand to nothing rather than themselves. shopt -s nullglob; files=(*); echo "There are ${#files[@]} files." - see: http://mywiki.wooledge.org/NullGlob _adb 1512226172 forget _adb 1512226185 learn Causes unmatched globs to expand to nothing rather than themselves. shopt -s nullglob; files=(*); echo "There are ${#files[@]} files." - see: http://mywiki.wooledge.org/glob#nullglob