- 论坛徽章:
- 0
|
[root]# cat f1.txt
9 a
11 b
[root]# cat f2.txt
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
10 10
11 11
使用以下方法可以合并文件记录
[root]# join f1.txt f2.txt
9 a 9
11 b 11
可修改f2.txt的文件第一行内容为:
[root]# cat f1.txt
10 a
11 b
再使用相同方法,就不可以合并记录(没有输出)
[root]# join f1.txt f2.txt
[root]#
join的版本为:
[root]# join --version
join (GNU coreutils) 5.97
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software. You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.
Written by Mike Haertel.
-------------
本人试验使用一个文件第一列从单位数开始递增,另一文件第一列从双位数开始递增,就不能合并记录。请问一下,有没有哪位知道是什么原因,或哪里的文档手册有说明。
|
|