Home
Sign Up
Sign In
V2EX
›
问与答
linux 环境下,合并文本文档的问题。
70599
·
Jan 15, 2015
· 2496 views
This topic created in 4337 days ago, the information mentioned may be changed or developed.
1、Linux环境。
2、有A.txt和B.txt。
3、两者有的行是一样的,有的行不一样。
怎样合并二者,并且让合并后的文件中没有重复的行?
合并
b.txt
a.txt
3 replies
•
2015-01-15 15:32:29 +08:00
fising
Jan 15, 2015
1
join uniq
lifanxi
Jan 15, 2015
1
2
不再乎行的顺序的话,cat a.txt b.txt | sort -u > c.txt
70599
OP
Jan 15, 2015
3
@
lifanxi
够用了,谢谢。
About
·
Help
·
Advertise
·
Blog
·
API
·
FAQ
·
Privacy
·
Solana
·
4323 Online
Highest 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 34ms ·
UTC 07:16
·
PVG 15:16
·
LAX 23:16
·
JFK 02:16
♥ Do have faith in what you're doing.
❯