Hi guys,
I am new to AWK and unix scripting. Please see below my problem and let me know if anyone you can help.
I have 2 input files (example given below)
Input file 2 is a standard file (it will not change) and we have to get the name (second column after comma) from it and append it in the Input file 1 (see output file below highlighted in blue). The content of first input file Input file 1 will keep changing though.
If we get a match with first number [before first dot (.)] then concatenate the name from second file at the end with a comma (,).
Input file 1
Aug 14 10:37 123.XYZ.106.20061023160210.in
Aug 14 12:59 135.XYZ.107.20061023160210.in
Aug 14 13:15 234.XYZ.108.20061023160210.in
Input file 2
111,ABCD
123,EFGH
124,TYUI
125,RTYUGH
135,RTYT
139,REFG
234,GHJK
345,GHJK
346,JKHG
Output file
Aug 14 10:37 123.XYZ.106.20061023160210.in, EFGH
Aug 14 12:59 135.XYZ.107.20061023160210.in, RTYT
Aug 14 13:15 234.XYZ.108.20061023160210.in, GHJK
Appreciate your responses.