Normally I like to use find instead of glob With minpath, maxpath, name and etc, you get safe empty result when dir is empty.
Regards, Em sex, 4 de set de 2015 10:10, Bastian Bittorf <[email protected]> escreveu: > * Karl Palsson <[email protected]> [04.09.2015 15:02]: > > So let's -d test the directory instead of -e testing every file just in > > case the directory didn't exist? > > even if the directory exists but is empty, the globbing fails. > but i get your point. what about: > > [ -n "$( ls -1 $dir )" ] && { > for FILE in $dir/*; do > . "$FILE" > done > } > > but i dont like it! any other comments > > bye, bastian > _______________________________________________ > openwrt-devel mailing list > [email protected] > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel >
_______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
