2013-12-06 12:04:52 +01:00
|
|
|
# $NetBSD: merge.awk,v 1.1 2013/11/22 16:00:45 christos Exp $
|
2013-01-22 12:03:53 +01:00
|
|
|
#
|
|
|
|
# @(#)merge.awk 8.3 (Berkeley) 5/25/94
|
|
|
|
#
|
|
|
|
# merge index entries into one line per label
|
|
|
|
$1 == prev {
|
|
|
|
printf ", %s", $2;
|
|
|
|
next;
|
|
|
|
}
|
|
|
|
{
|
|
|
|
if (NR != 1)
|
|
|
|
printf "\n";
|
|
|
|
printf "%s \t%s", $1, $2;
|
|
|
|
prev = $1;
|
|
|
|
}
|
|
|
|
END {
|
|
|
|
printf "\n"
|
|
|
|
}
|