查看该目录下有几个文件夹几个文件的shell代码
摘要:
#!/bin/sh
directory()
{ let "filenum = 0 " let "dirnum = 0 " ls $1 echo "" for dir in $( ls ) do if [ -d $dir ] then let "dirnum+=1" else let "filenum+=1" fi done echo "The number of directories is $dirnum " echo "The number of files i 阅读全文
posted @ 2011-10-08 17:47
无心出岫
阅读(324)
评论(0)
推荐(0)