遍历目录下的文件

#!/bin/sh

for file in ./*
do
if [ -f $file ];then
echo $file
echo 是文件
fi
if [ -d $file ];then
echo $file
echo 是目录
fi
done

posted on 2015-01-12 20:34  万里驰骋  阅读(137)  评论(0)    收藏  举报

导航