diff options
Diffstat (limited to '2015/12/puzzle-2.sh')
-rwxr-xr-x | 2015/12/puzzle-2.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/2015/12/puzzle-2.sh b/2015/12/puzzle-2.sh index b1e649c..b941678 100755 --- a/2015/12/puzzle-2.sh +++ b/2015/12/puzzle-2.sh @@ -1,7 +1,7 @@ -#!/usr/bin/env sh +#!/bin/sh -jq 'walk(if type == "object" then del(select(.[] == "red")) end)' input \ - | tr -c '\-0-9' '\n' \ - | grep . \ - | paste -sd+ \ +jq 'walk(if type == "object" then del(select(.[] == "red")) else . end)' input \ + | tr -c '\-0-9' '\n' \ + | grep . \ + | paste -sd+ \ | bc |