标签:shell
现有file1、file2、file3三个文件,其内容如下
$cat file1 f1_1 f1_2 f1_3 $cat file2 f2_1 f2_2 f2_3 $cat file3 f3_1 f3_2 f3_3
编写shell脚本逐行读取这三个文件
#!/bin/bash cat file1 file2 file3 |while read p do echo $p done
【思考】
采用done引入多个文件,怎么实现?
#!/bin/bash
while read p
do
echo $p
done < {several_input_files}
标签:shell
原文地址:http://xoyabc.blog.51cto.com/7401264/1704973