aboutsummaryrefslogtreecommitdiff
path: root/2023/01/puzzle-2.an
blob: 81638af864528bc95b115a757fb544ff7b50a237 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/local/bin/andy

sed -E '
	s/one/&1&/g
	s/two/&2&/g
	s/three/&3&/g
	s/four/&4&/g
	s/five/&5&/g
	s/six/&6&/g
	s/seven/&7&/g
	s/eight/&8&/g
	s/nine/&9&/g
' input
| tr -d a-z
| sed -E 's/(.).*(.)/\1\2/; s/^.$/&&/'
| paste -sd+
| bc