about summary refs log tree commit diff
path: root/aoc/2022/01/part-one.sh
diff options
context:
space:
mode:
Diffstat (limited to 'aoc/2022/01/part-one.sh')
-rwxr-xr-xaoc/2022/01/part-one.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/aoc/2022/01/part-one.sh b/aoc/2022/01/part-one.sh
new file mode 100755
index 0000000..a0e0095
--- /dev/null
+++ b/aoc/2022/01/part-one.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+sed 's/$/+/' | { echo 0; sed 's/^+$/p0/'; echo p; } | dc | sort -n | tail -1