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

X=$(tr -d '\n' <input | wc -c)
Y=$(sed 's/\(^"\|"$\)//g; s/\\x[a-f0-9]\{2\}/./g; s/\\[\\"]/./g' input \
	| tr -d '\n'                                                   \
	| wc -c)
expr $X - $Y