Tag Archives: awk merge files

awk merge files base on the keyword

use the awk variables NR and FNR merge files base on the keywords.
awk -F’ ‘ ‘NR==FNR{a[$1]=$2;}NR!=FNR{print $0, a[$1]}’ test-4.txt test-5.txt Continue reading

Posted in Awk Command, Text Processing | Tagged , , , | Comments Off on awk merge files base on the keyword