From c95723952a479ed35347cbd196dc1986be932732 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Fri, 10 Dec 2021 07:34:52 +0100 Subject: Add a sed/sh solution --- 2021/10/puzzles.sh | 4 ++++ 1 file changed, 4 insertions(+) create mode 100755 2021/10/puzzles.sh (limited to '2021/10/puzzles.sh') 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' -- cgit v1.2.3