Last active
December 5, 2023 13:20
-
-
Save mducle/51fa7cc2094f9f0c1cf4b6775d879a09 to your computer and use it in GitHub Desktop.
Advent of code 2023
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo $(sed s/[A-z]//g ~/Downloads/input | sed "s/\([0-9]\)/\1 /g" | awk '{print $1, $NF}'| sed "s/ //" | sed "s/$/+/") | sed "s/+$//"|bc | |
cp ~/Downloads/input tt && for ii in "one,o1e" "two,t2o" "three,t3e" "four,f4r" "five,f5e" "six,s6x" "seven,s7n" "eight,e8t" "nine,n9e"; do cm=$(echo $ii | awk -F, '{print "sed s/"$1"/"$2"/g tt > t2 && mv t2 tt"}'); echo $cm|bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment