aboutsummaryrefslogtreecommitdiff
path: root/2015/08/puzzle-2.sh
blob: 2157ae30c2df07f3c4fdb97a6d9479de67c322f2 (plain) (blame)
1
2
3
4
5
6
7
#!/bin/sh

X=$(sed 's/\("\|\\\)/\\&/g; s/^/../' input \
	| tr -d '\n'                       \
	| wc -c)
Y=$(tr -d '\n' <input | wc -c)
expr $X - $Y