shell-for
来源:互联网 发布:java就业培训班 编辑:程序博客网 时间:2024/06/05 00:09
#!/bin/bash
#1-2-7
#变量count用于统计文件的数目
count=0
#变量files遍历一遍当前文件夹
for files in *
do
#判断的files是否是文件,如果是将count变量的值加一再赋值给自己
#expr :表示数学运算
#`` 将其内的值给出
# = 两边都不能有空格
if [ -f "$files" ];then
count=`expr $count + 1`
fi
done
#输出结果
#"" 中不限制变量但会限制通配符
echo "There are $count file(s) in `pwd`"
- shell for
- shell-for
- shell for
- [shell]shell-for语句总结
- for shell 处理
- Shell For 循环
- java for shell
- Eclipse Shell for Plugin
- Shell for用法
- for语句–shell
- For myself / shell
- shell for循环
- eqq for shell
- Eclipse Shell for Plugin
- shell for循环语句
- for&while loop/shell
- linux shell----for Loop
- SHELL中for用法
- js判断常用
- 迅雷笔试
- 201208 Apr 用python启动一个线程有多少种方法?
- UML几种类图关系和表示
- Canvas、StackPanel、Grid三者之间的关系
- shell-for
- 视图翻页过度效果
- 如何修改android开机启动默认横竖屏
- android activity
- DAPM很好的文档,以备后用
- C++内存管理
- 创建、配置和使用自定义JSP标签
- winform实现发票打印功能
- Android USB\HDMI等事件监听