test -d dir
echo $?
for A in `ls`
do
test -d $A
if [ $? -eq 0 ]
then
echo director is $A
else
echo file is $A
fi
done
shell脚本 for循环迭代文件
最新推荐文章于 2024-06-18 15:08:38 发布
test -d dir
echo $?
for A in `ls`
do
test -d $A
if [ $? -eq 0 ]
then
echo director is $A
else
echo file is $A
fi
done