From 8554b324d4a0437c37ec37538ccfd6066775fc66 Mon Sep 17 00:00:00 2001 From: setop Date: Thu, 1 Dec 2022 22:45:38 +0100 Subject: [PATCH] day 1 --- d01/part1.awk | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 d01/part1.awk diff --git a/d01/part1.awk b/d01/part1.awk new file mode 100644 index 0000000..f838e55 --- /dev/null +++ b/d01/part1.awk @@ -0,0 +1,4 @@ +# 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 }