]> code.bitgloo.com Git - clyne/advent-of-code.git/commitdiff
Create one-liner.sh
authorclyne <clyne@bitgloo.com>
Fri, 2 Dec 2022 11:18:00 +0000 (06:18 -0500)
committerGitHub <noreply@github.com>
Fri, 2 Dec 2022 11:18:00 +0000 (06:18 -0500)
day1/one-liner.sh [new file with mode: 0644]

diff --git a/day1/one-liner.sh b/day1/one-liner.sh
new file mode 100644 (file)
index 0000000..3854e98
--- /dev/null
@@ -0,0 +1,2 @@
+cat input | tr '\n' '+' | sed 's/++/\n/' | bc | sort -n | tail -n 3
+# sum the top three with a calculator :)