如何使用bash由线连接两个文件行 [英] How to concatenate two files line by line using bash
本文介绍了如何使用bash由线连接两个文件行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有两个文本文件,他们每个人的包含线的信息,像
I have two text files, each of them contains an information by line such like that
file1.txt file2.txt
---------- ---------
linef11 linef21
linef12 linef22
linef13 linef23
. .
. .
. .
我想,以获得使用bash脚本线来连接论文文件中的行:
I would like to concatenate theses files lines by lines using a bash script in order to obtain :
fileresult.txt
--------------
linef11 linef21
linef12 linef22
linef13 linef23
. .
. .
. .
我
能如何使用bash脚本?
How can I do using a bash script ?
感谢您提前为您的答复。
Thank you in advance for your replies.
推荐答案
您可以使用 粘贴
:
You can use paste
:
paste file1.txt file2.txt > fileresults.txt
这篇关于如何使用bash由线连接两个文件行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文