fileCount=ls ${thisSourceFilePath}|wc -l
if [ “$fileCount” -gt “0” ]
#如果文件夹不为空
then
do something
else
#如果文件夹为空
do something
fi
shell中判断当前目录下的文件数量
最新推荐文章于 2024-06-13 06:00:00 发布
fileCount=ls ${thisSourceFilePath}|wc -l
if [ “$fileCount” -gt “0” ]
#如果文件夹不为空
then
do something
else
#如果文件夹为空
do something
fi