Chinaunix

标题: shell下如何判断某目录为空目录? [打印本页]

作者: gisworld    时间: 2005-06-07 22:50
标题: shell下如何判断某目录为空目录?
shell下如何判断某目录为空目录?
我用的应该是bash.
谢谢。
作者: icesummit    时间: 2005-06-07 23:12
标题: shell下如何判断某目录为空目录?
http://bbs.chinaunix.net/forum/viewtopic.php?t=554965&show_type=&postdays=0&postorder=asc&start=0
作者: gisworld    时间: 2005-06-08 11:46
标题: shell下如何判断某目录为空目录?
谢谢。
我用了一个笨办法
if [ -z $(ls dir) ]
then
...
fi




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2