[[email protected] tmp]# cat 1.txt
1 2 3
4 5 6
[[email protected] tmp]# cat 2.txt
11 22 33
44 55 66
[[email protected] tmp]# awk ‘{for(i=1;i<=NF;i++) a[i]=$i; getline < "1.txt" ;for (i=1;i<=NF;i++) printf a[i]+$i " " ;printf "\n" }‘ 2.txt
12 24 36
48 60 72
[[email protected] tmp]#
时间: 2024-10-13 08:20:10