mirror of
https://github.com/johnkerl/miller.git
synced 2026-07-18 17:04:50 +00:00
16 lines
336 B
Text
16 lines
336 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,k),v in @records) {
|
|
if (k == "n") {
|
|
if (@records[nr]["n"] == @maxn) {
|
|
emit @records[nr]
|
|
}
|
|
}
|
|
}
|
|
}
|