shell编程--遍历目录下的文件
2015-09-08 16:50
357 查看
filepath="$(pwd)/rpm"
filename=""
for filename in `ls $filepath`
do
//遍历文件
break;
done
filename=""
for filename in `ls $filepath`
do
//遍历文件
break;
done
相关文章推荐
- Linux Shell中的数组及遍历
- linux shell 数组建立及使用技巧
- Linux的SHELL学习指南
- shell 截取字符串(转)
- shell中特殊变量$0 $1 $# $$ $! $?的涵义
- shell脚本中位置参数 $0 $1 .. $* $#的备忘
- Linux shell脚本的字符串截取
- linux shell
- shell 打印偶数行-奇数行 ,打印行号
- 查看使用了那种shell
- shell 打印偶数行奇数行
- shell脚本 函数传递参数
- shell主要命令使用总结
- shell中exec和system解析
- shell脚本语法总结
- profile和bash
- shell条件测试
- Shell获取文件的文件名和扩展名的例子
- linux shell 种类
- shell中if条件字符串、数字 [[ ]]和[ ]区别