📄 join
字号:
用法:join [选项]... 文件1 文件2For each pair of input lines with identical join fields, write a line tostandard output. The default join field is the first, delimitedby whitespace. When FILE1 or FILE2 (not both) is -, read standard input.-a FILENUM print unpairable lines coming from file FILENUM,where FILENUM is 1 or 2, corresponding to FILE1 or FILE2-e EMPTY replace missing input fields with EMPTY-i, --ignore-case ignore differences in case when comparing fields-j FIELD equivalent to `-1 FIELD -2 FIELD'-o FORMAT obey FORMAT while constructing output line-t CHAR use CHAR as input and output field separator-v FILENUM like -a FILENUM, but suppress joined output lines-1 FIELD join on this FIELD of file 1-2 FIELD join on this FIELD of file 2--help 显示此帮助信息并退出--version 输出版本信息并退出注意:使用join应注意连接域到底是哪一个,比如说你认为正在访问域 4,但实际上join应该访问域5,这样将不返回任何结果。如果是这样,用 awk检查域号。例如,键入 $ awk '{print $4}'文件名,观察其是否匹配假想域;$cat tt-rwxr-xr-x 1 root root 1499 04-16 17:04 GC0204216.txt-rw-r--r-- 1 root root 234 04-16 17:36 lxs-rw-r--r-- 1 root root 322 04-16 17:51 temp-rwxr--r-- 1 root root 83 04-16 08:24 test.sed-rw-r--r-- 1 root root 0 04-16 18:25 tt-rw-r--r-- 1 root root 283 04-16 18:07 ttt$cat ttt-rw-r--r-- 1 root root 550 14 07:34 df-rw-r--r-- 1 root root 550 13 17:49 dir-rw-r--r-- 1 root root 942 13 18:14 ifconfig-rw-r--r-- 1 root root 550 07 17:59 ip-rw-r--r-- 1 root root 85 14 08:24 strip-rw-r--r-- 1 root root 394 14 00:13 tt-rw-r--r-- 1 root root 272 16 07:19 ttt$join -j1 8 -j2 8 tt ttttt -rw-r--r-- 1 root root 0 04-16 18:25 -rw-r--r-- 1 root root 394 14 00:13ttt -rw-r--r-- 1 root root 283 04-16 18:07 -rw-r--r-- 1 root root 272 16 07:19$join -a1 -j1 8 -j2 8 tt tttGC0204216.txt -rwxr-xr-x 1 root root 1499 04-16 17:04lxs -rw-r--r-- 1 root root 234 04-16 17:36temp -rw-r--r-- 1 root root 322 04-16 17:51test.sed -rwxr--r-- 1 root root 83 04-16 08:24tt -rw-r--r-- 1 root root 0 04-16 18:25 -rw-r--r-- 1 root root 394 14 00:13ttt -rw-r--r-- 1 root root 283 04-16 18:07 -rw-r--r-- 1 root root 272 16 07:19
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -