aoc2022/d01/part1.awk

6 lines
159 B
Awk
Raw Permalink Normal View History

2022-12-01 21:45:38 +00:00
# awk -f part1.awk < input | sort -n | tail -n 1
# awk -f part1.awk < input | sort -n | tail -n 3 | sum0
NF == 0 { print a; a = 0 }
{ a+=$1 }
2022-12-01 21:56:49 +00:00
END { print a; }