I have two files; I want to join them.
$cat t1 1 1.2 2 2.2 $cat t2 1 2 1
I want to have the output below
$cat joind.tx
5条回答 天涯浪人 (楼主) 2021-01-15 22:38 you can try AWK: awk 'NR==FNR{a[$1]=$2}NR>FNR{print $1,a[$1]}' t1 t2 0 讨论(0) 查看其它5个回答 发布评论: 提交评论 加载中... 自定义标题段落格式字体字号代码语言点击上传x 验证码 看不清? 提交回复
you can try AWK:
AWK
awk 'NR==FNR{a[$1]=$2}NR>FNR{print $1,a[$1]}' t1 t2
热议问题