会员
周边
新闻
博问
融资
云市场
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
无心出岫
查看该目录下有几个文件夹几个文件的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 is $filenum " } directory
posted on
2011-10-08 17:47
无心出岫
阅读(
318
) 评论(
0
)
编辑
收藏
举报
会员力量,点亮园子希望
刷新页面
返回顶部
导航
博客园
首页
联系
订阅
管理