#!/bin/shfor file in ./*do if [ -f $file ];then echo $file echo 是文件 fi if [ -d $file ];then echo $file echo 是目录 fidone