linux 中join命令

发布时间 2023-06-04 13:37:58作者: 小鲨鱼2018

 

001、

[root@PC1 test3]# ls
file1.txt  file2.txt
[root@PC1 test3]# cat file1.txt
1 John
2 Mary
3 Tom
[root@PC1 test3]# cat file2.txt
1 M
2 F
4 M
[root@PC1 test3]# join file1.txt file2.txt    ## 依据第一列进行合并
1 John M
2 Mary F

 

 

来源:https://blog.csdn.net/qq_51010919/article/details/130736274