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

jq 'walk(if type == "object" then del(select(.[] == "red")) end)' input \
	| tr -c '\-0-9' '\n' \
	| grep . \
	| paste -sd+ \
	| bc