From: clyne Date: Fri, 2 Dec 2022 11:18:00 +0000 (-0500) Subject: Create one-liner.sh X-Git-Url: https://code.bitgloo.com/?a=commitdiff_plain;h=e20eb4c7a83d354d8f3ad44207d1ef0e9f597004;p=clyne%2Fadvent-of-code.git Create one-liner.sh --- 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 :)