aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorclyne <clyne@bitgloo.com>2022-12-02 06:18:00 -0500
committerGitHub <noreply@github.com>2022-12-02 06:18:00 -0500
commite20eb4c7a83d354d8f3ad44207d1ef0e9f597004 (patch)
treece94f23407265b8158819818473d51a576dbdfcf
parentba7234aef9421278ad36bc09e5fddde9af4ce001 (diff)
Create one-liner.sh
-rw-r--r--day1/one-liner.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/day1/one-liner.sh b/day1/one-liner.sh
new file mode 100644
index 0000000..3854e98
--- /dev/null
+++ b/day1/one-liner.sh
@@ -0,0 +1,2 @@
+cat input | tr '\n' '+' | sed 's/++/\n/' | bc | sort -n | tail -n 3
+# sum the top three with a calculator :)