1# @(#)merge.awk 8.3 (Berkeley) 5/25/94 2# 3# merge index entries into one line per label 4$1 == prev { 5 printf ", %s", $2; 6 next; 7} 8{ 9 if (NR != 1) 10 printf "\n"; 11 printf "%s \t%s", $1, $2; 12 prev = $1; 13} 14END { 15 printf "\n" 16} 17