Answers for "awk extract one file from another file"

0

awk extract one file from another file

awk 'NR==FNR{huty[$1]=$2;next}NR>FNR{if($1 in huty){print $0 "\t" huty[$1]} else {print $0 "\t" "None"}}' input1.txt input2.txt > output.txt

cat output.txt
北京    beijing
上海    shanghai
广州    guangzhou
南京    None
Posted by: Guest on August-26-2021

Code answers related to "awk extract one file from another file"

Browse Popular Code Answers by Language