summaryrefslogtreecommitdiff
path: root/usr.bin/vi/docs/USD.doc/vi.ref/merge.awk
blob: 0849ade570bdd2294eaac3cad8a8a47d1d0aec78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#	$OpenBSD: merge.awk,v 1.3 2001/01/29 01:58:35 niklas Exp $

#	@(#)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"
}