将两个文件的内容合并到bash中的一个文件中 [英] merge contents of two files into one file in bash
本文介绍了将两个文件的内容合并到bash中的一个文件中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有两个文件,其中包含以下内容
I have two files which has following contents
File1
Line1file1
Line2file1
line3file1
line4file1
File2
Line1file2
Line2file2
line3file2
line4file2
我想将这些文件的内容合并为file3作为
I want to have these file's content merged to file3 as
File3
Line1file1
Line1file2
Line2file1
Line2file2
line3file1
line3file2
line4file1
line4file2
如何在bash中从一个文件和另一个文件连续合并文件?
How do I merge the files consecutively from one file and another file in bash?
谢谢
推荐答案
paste -d"\n" File1 File2 > File3
这篇关于将两个文件的内容合并到bash中的一个文件中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文