summaryrefslogtreecommitdiff
path: root/2022/day01/main.sh
diff options
context:
space:
mode:
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