minix/usr.bin/nvi/docs/USD.doc/vi.ref/merge.awk

19 lines
286 B
Awk
Raw Normal View History

# $NetBSD: merge.awk,v 1.1 2008/09/02 09:25:39 christos 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"
}