LINUX.ORG.RU

История изменений

Исправление winlook38, (текущая версия) :

awk -F\, '{arr1[$3,",",$4]+=$1; arr2[$3,",",$4]+=$2} END {for (i in arr1) {print arr1[i] "," arr2[i] "," i}}' data.txt

Исходная версия winlook38, :

awk -F\, '{arr1[$3,",",$4]+=$1; arr2[$3,",",$4]+=$2} END {for (i in arr1) {print arr1 "," arr2 "," i}}' data.txt