diff options
Diffstat (limited to '2015/12')
-rwxr-xr-x | 2015/12/puzzle-1.sh | 2 | ||||
-rwxr-xr-x | 2015/12/puzzle-2.sh | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/2015/12/puzzle-1.sh b/2015/12/puzzle-1.sh index e1e1f0e..8173222 100755 --- a/2015/12/puzzle-1.sh +++ b/2015/12/puzzle-1.sh @@ -1,3 +1,3 @@ -#!/usr/bin/env sh +#!/bin/sh tr -c '\-0-9' '\n' <input | grep . | paste -sd+ | bc 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 |