Test text content
# cat-n Name1.txt 1name1 alvin1 2name2 alvin2 3name3 alvin3 4name4 alvin4# cat-n name2.txt 1name1 1 XX 2name2 101 3name3 102 4CCCCCCCCCCCCCCCC
(1) Join
Display matching rows and merge values (CCC and name4 do not match so do not show) # join Name1.txt name2.txtname1 alvin1 100name2 alvin2 101name3 alvin3 102
(2)-A
Matches the contents of the 1th file, matches the matching rows, and merges their values; Mismatched rows are displayed, but their values are empty # join-a1 name1.txt name2.txtname1 alvin1 100name2 alvin2 101name3 alvin3 102name4 Alvin4
Matches the contents of the 2nd file, matches the matching rows, and merges their values; Mismatched rows are displayed, but their values are empty # join-a2 name1.txt name2.txtname1 alvin1 100name2 alvin2 101name3 alvin3 102cccccccccccccccc
Two files match, if matched, displays the matching rows, merges their values, and displays all unmatched rows as well. # join-a1 name1.txt-a2 name2.txtname1 alvin1 100name2 alvin2 101name3 alvin3 102ccccccccccccccccname4 Alvin4
(3)-O
For matching lines, output "part 2nd of the 1th file, section 2nd of 2nd file", # Join-o 1.2 2.2 name1.txt name2.txtalvin1 100alvin2 101alvin3 102
# Join-o 1.1 2.1 name1.txt name2.txtname1 name1name2 Name2name3 Name3
[Shell Foundation]--join Command