Basically, I have two files
dupestest.txt
152,153
192,193
215,216
290,291
2279,2280
2282,2283
haftest.txt
152,ABBOTS ROAD
153,ABBOTS ROAD
154,ABBOTS ROAD
155,ABBOTS ROAD
156,ABBOTS ROAD
157,ABBOTS ROAD
I want to find the numbers in dupestest.txt in haftest.txt and produce this outcome: results.txt
152,ABBOTS ROAD,153 ABBOTS ROAD
192,ABBOTS ROAD,193,ABBOTS ROAD
etc
Can anyone give me any advice?
It has to be in awk.