mirror of
https://github.com/johnkerl/miller.git
synced 2026-01-23 18:25:45 +00:00
15 lines
319 B
Text
15 lines
319 B
Text
# Retain all records
|
|
@records[NR] = $*;
|
|
# Track max value of n
|
|
@maxn = max(@maxn, $n);
|
|
|
|
# After all records have been read, loop through retained records
|
|
# and print those with the max n value.
|
|
end {
|
|
for (nr in @records) {
|
|
map record = @records[nr];
|
|
if (record["n"] == @maxn) {
|
|
emit record;
|
|
}
|
|
}
|
|
}
|