2
rated 0 times
[
2]
[
0]
/ answers: 1 / hits: 5709
/ 2 Years ago, sun, february 27, 2022, 9:54:11
I have file1
and file2
as following. I would like to first find matches between two files based on first column and then print the matching lines from file1
and file2
. I have written the desired output below
$ cat file1
1, 456, abcd, ...
23, 567, rstc, ...
45, 678, rsto, ...
$ cat file2
23, 5607, abcstc, ...
45, 28, zfgsto, ...
Desired output:
23, 567, rstc, ...
23, 5607, abcstc, ...
45, 678, rsto, ...
45, 28, zfgsto, ...
More From » awk