Hi,
I have two files like this:
8 1.3
10 1.3
12 1.3
15 1.3
21 1.3
and
1
2
3
4
10
11
15
16
21
22
23
I want to check if values in $1 of file 1 are present in file 2, and if it is present, then print (file1 $1) (file1 $2) (file2 $1).
This works is file 1 has a single column, how do I make it work for two columns.
awk -F";" 'NR==FNR{a[$1]=$2;next}{if ($1 in a)print a[$1]$0;}' file2 file1
Thanks!
The output should be
10 1.3
15 1.3
21 1.3