diff options
author | Thomas Voss <mail@thomasvoss.com> | 2022-11-30 12:23:17 +0100 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2022-11-30 12:23:17 +0100 |
commit | f3e3e3e354b87f4ce27bd74bf14cec05d06974b6 (patch) | |
tree | 112352e9c3ba5d5d924036def2b5f853d3f8dc28 /2015/12/puzzle-2.sh | |
parent | 4742dd73046c53cff7fe54deee58358c3b193206 (diff) |
Lots of cleanup and stuff
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 |