xref: /freebsd/share/doc/usd/13.viref/merge.awk (revision d586a8e4aef9a91320edb0a54f78940d827b3ecd)
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