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

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