Hi All,
a new bie to awk,
How to compare substring of col1,file 1 with
col2file2 and get file1contents+col3file2 as output.
file1
-----
kumarfghh,23,12000,5000
rajakumar,24,14000,2500
rajeshchauhan,25,16000,2600
manoj,26,17000,2300
file 2
--------
123,kumar,US,
123,sukumar,UK
123,raj,Germany
40,rajesh,Australia
40,jerome,swiss
40,rakesh,india
output
-----------------------
kumarfghh,23,12000,5000,kumar,US
rajakumar,24,14000,2500,raj,Germany
rajeshchauhan,25,16000,2600,rajesh,Australia
manoj,26,17000,2300,,
Note:so if nothing matched i should get a default value as null.
Please help me,as i have been trying very hard to acheive