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