/usr/share/doc/gawk/examples/prog/histsort.awk is in gawk 1:4.1.3+dfsg-0.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # histsort.awk --- compact a shell history file
# Thanks to Byron Rakitzis for the general idea
#
# Arnold Robbins, arnold@skeeve.com, Public Domain
# May 1993
{
if (data[$0]++ == 0)
lines[++count] = $0
}
END {
for (i = 1; i <= count; i++)
print lines[i]
}
|