join

English [d???n]

vt.& vi. ??; ??

vt. road)

n.??; ??; ???

3?? ??: Joins ?? ??: Join ?? ??: Join

??? ?? ?? ???

??: join ??? ? ??? ??? ??? ??? ??? ?? ?? ???? ? ?????.

??: ??join [-i][-a<1 ?? 2>][-e][-o][-t][-v<1 ?? 2>] [-1][-2][--help][--version][?? 1][?? 2]

??? ?? ?? ?

join ??? ???? ???? ?? ?? cat ??? ?? testfile_1, testfile_2 ??? ??? ??? ???.

?? ?? ? ??? ?? ???? ???? ? ??? ??? ??? ??? ??? ?? ?? ??? ?? ???? ??? ?????.

join testfile_1 testfile_2

?? testfile_1 ? testfile_2?? ?? ??? ?????.

$ cat testfile_1 #testfile_1文件中的內(nèi)容  Hello 95

# ?? ?? ? ??? ? ?? ?? ???? ? ?? ?? ??

Linux 85  
test 30  cmd@hdd-desktop:~$ cat testfile_2 #testfile_2文件中的內(nèi)容  
Hello 2005 #例如,本例中第一列為姓名,第二列為年份  
Linux 2009  
test 2006

?? ?? Join ??? ???? ? ??? ???? ??? ????.

$ join testfile_1 testfile_2 #連接testfile_1、testfile_2中的內(nèi)容  
Hello 
95 
2005 #連接后顯示的內(nèi)容  
Linux 85 2009  
test 30 2006

?? ??. 1? ?? 2? ?? ???? ?????. ?? ?? ???? ? ??? ????? ?? ??? ?????.

join testfile_2 testfile_1
?? ??? ?? ?? ??? ??? ?? ?????.

$ join testfile_2 testfile_1 #改變文件順序連接兩個文件  
Hello 2005 95 
#連接后顯示的內(nèi)容  
Linux 2009 85  
test 2006 30