aboutsummaryrefslogtreecommitdiff
path: root/2021/01/puzzles.sh
diff options
context:
space:
mode:
Diffstat (limited to '2021/01/puzzles.sh')
-rw-r--r--2021/01/puzzles.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/2021/01/puzzles.sh b/2021/01/puzzles.sh
new file mode 100644
index 0000000..9cf8043
--- /dev/null
+++ b/2021/01/puzzles.sh
@@ -0,0 +1,3 @@
+#!/usr/bin/env sh
+
+paste -s input | awk '{ for (i = 1; i < NF; i++) c += $i < $(i + DELTA) } END { print c }'