Hello, With the CentOS 7 join command I would like to concatenate the contents of the next two files.
[File 1] [email protected] [email protected] [email protected] - [File 2] [email protected] 1 password 1 [email protected] 2 password 2 For the concatenation method, "For all the records in File 1, concatenate the values of column 1 with the values of column 2 and column 3 of the record of File 2 that matches column 1". "However, it is a specification that columns 2 and 3 of records which are only in File 1 display fixed characters" 0 "and" PASSWORD 0 ". For File 1, File 2, the results you want to obtain are as follows. [Expected results] [email protected] 0 PASSWORD 0 [email protected] 2 password 2 [email protected] 1 password 1 I tried executing the following command, but the record "[email protected]" which exists only in File 1 has two pairs of character strings specified by "-e" output. $ Join -1 1 - o 0 2.2 2.3 - a 1 - e "0 PASSWORD 0" <(sort File 1) <(sort File 2) [Actual result] Jiro @ yahoo.jp 0 PASSWORD 0 0 PASSWORD 0 [email protected] 2 password 2 [email protected] 1 password 1 If you remove the double quotes from the command line you ran, "join: extra operator '/ dev / fd / 62'" and an unknown error will be displayed and say "- e 0 - e PASSWORD 0" The syntax is also an error. How do I specify correct results? ------------------------------------------ Oita Electronic Computer Center Co.,Ltd. Oita city, Oita prefecture, Japan Mail to: [email protected]
