2017-07-28 115 views
0

我有2個文本文件:如何將兩個或多個文本文件添加到一個帶有列的文本文件中? (Linux或Windows下)

[[email protected] ~]# cat test1.txt 
apple 
orange 
grapes 
banana 
cherry 

[[email protected] ~]# cat test2.txt 
carrot 
lettuce 
garlic 
artichoke 
lemon 

我想加入不同的colums這兩個文件,以便輸出如下所示:

[[email protected] ~]# cat testfinal.txt 
apple carrot 
orange lettuce 
grapes garlic 
banana artichoke 
cherry lemon 

任何想法如何能我這樣做?由於

+0

您是否在尋找[pate](https://en.wikipedia.org/wiki/Paste_(Unix))? –

回答

0

在linux下使用命令paste

paste test1.txt test2.txt > testfinal.txt 

在我認爲你必須犧牲山羊或東西的窗口。

+0

非常感謝!!!! –

相關問題