aboutsummaryrefslogtreecommitdiff
path: root/2021/10/puzzles.sh
diff options
context:
space:
mode:
authorThomas Voss <thomasvoss@live.com> 2021-12-10 07:34:52 +0100
committerThomas Voss <thomasvoss@live.com> 2021-12-10 07:34:52 +0100
commitc95723952a479ed35347cbd196dc1986be932732 (patch)
treec61f601be61861df8eb42e4e60498c3137eca3d5 /2021/10/puzzles.sh
parentf67d7c9bc53a40edbc5cc86397c0569f1c2b445f (diff)
Add a sed/sh solution
Diffstat (limited to '2021/10/puzzles.sh')
-rwxr-xr-x2021/10/puzzles.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/2021/10/puzzles.sh b/2021/10/puzzles.sh
new file mode 100755
index 0000000..4222f7a
--- /dev/null
+++ b/2021/10/puzzles.sh
@@ -0,0 +1,4 @@
+#!/usr/bin/env sh
+
+sed -f puzzle-1.sed input | paste -sd+ | bc
+sed -f puzzle-2.sed input | bc | sort -n | sed '27!d'