水平文件串联


Answers:


40

paste 可能会成功。

% cat t1 
a
b
c
c
d
f
g
% cat t2 
h
i
j
k
l
m
n
% paste t1 t2 
a       h
b       i
c       j
c       k
d       l
f       m
g       n

至少在某些时候,您不需要“键”来连接行。


5
如上例所示,默认定界符为TAB ...无定界符:paste -d '\0' t1 t2
Peter.O 2011年

这对千兆字节的文件有效吗?
SARose

@SARose我不知道。尝试一下,并对结果发表评论。
Bruce Ediger

4

join 应该可以解决问题-您只需要为行加上相同的ID即可。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.