Shell 同时读取多个文件
2015-10-29 10:20
459 查看
1、如果2个文件行数一样多,可以这样:
while read -u3 line1 && read -u4 line2
do
echo "$line1 $line2"
done 3<file1 4<file2
复制代码
2、不用管到就可以了
while read line
do
........
done < file
复制代码
while read -u3 line1 && read -u4 line2
do
echo "$line1 $line2"
done 3<file1 4<file2
复制代码
2、不用管到就可以了
while read line
do
........
done < file
复制代码
相关文章推荐
- Shell统计
- Bash 及其特性
- shell批量增删改查百库百表(mysql)
- Shell中read的选项及用法
- linux shell 编程3 判断当前的是不是目录、 传递参数的个数
- 退出Python的shell
- shell脚本 小试一下
- mysqlcheck命令时提示: bash: mysqlcheck: command not found
- shell脚本学习之旅
- Bash 4.4 中新增的 ${parameter@operator} 语法
- 一个不错的shell脚本学习网址-很全又很简单的课程
- 一个不错的shell脚本学习网址-很全又很简单的课程
- Shell基本命令
- bash的特点
- 【转】使用expect实现shell自动交互
- SHEll 学习内容
- ShellExecute调用程序出现R6010 -abort() has been called
- shell 简单例子(五)
- mongo shell启动配置文件.mongorc.js(四)
- mongo shell启动配置文件.mongorc.js(三)