You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
389 B
Bash

#!/bin/bash
sed 's/one/\01\0/g;s/two/\02\0/g;s/three/\03\0/g;s/four/\04\0/g;s/five/\05\0/g' | \
sed 's/six/\06\0/g;s/seven/\07\0/g;s/eight/\08\0/g;s/nine/\09\0/g' | \
./part1.sh
exit
sed 's/[a-z]//g' | \
tee >(cut -c 1 > /tmp/firstdigits) | \
tee >(rev | cut -c 1 > /tmp/seconddigits) > /dev/null | \
paste - /tmp/firstdigits /tmp/seconddigits -d "" | \
paste -sd+ | \
bc