summaryrefslogtreecommitdiff
path: root/2022/day01/main.sh
diff options
context:
space:
mode:
authorOrangerot <purple@orangerot.dev>2022-12-17 01:16:18 +0100
committerOrangerot <purple@orangerot.dev>2022-12-17 01:16:18 +0100
commit6596b48113ced669b206d2e1f1e8ba6edcba88a2 (patch)
tree02c7d01783390862d989df6c91aff968e03dd415 /2022/day01/main.sh
adv2022 first 8 days
Diffstat (limited to '2022/day01/main.sh')
-rwxr-xr-x2022/day01/main.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/2022/day01/main.sh b/2022/day01/main.sh
new file mode 100755
index 0000000..c5b60a5
--- /dev/null
+++ b/2022/day01/main.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+paste -sd+ /dev/stdin | sed 's/++/\n/g' | bc | sort -n
+# ./main.sh < input2.txt | tail -3 | paste -sd+ - | bc