A 1
2 b
3 c
4 d
===========
The file b
2
5
6
=============
The output file of a $2 match to the file b line
The output file a $2 does not match the file b line
CodePudding user response:
Top of a roof, a great godCodePudding user response:
A ah, don't sinkCodePudding user response:
Interest to have a try, do not know whether meet your requirements:The output file of a $2 match to the file b line
Awk 'NR==FNR {a [$1]=$1} NR> FNR {the if ($2==[$2) a) print} 'bb aa
The output file of a $2 does not match the file b line
Awk 'NR==FNR {a [$1]=$1} NR> FNR {the if ($2!=[$2) a) print} 'bb aa
CodePudding user response: