NetBSD/gnu/dist/gawk/awklib/eg/misc/arraymax.awk

11 lines
103 B
Awk
Raw Normal View History

1999-06-14 00:39:15 +04:00
{
if ($1 > max)
max = $1
arr[$1] = $0
}
END {
for (x = 1; x <= max; x++)
print arr[x]
}