aboutsummaryrefslogtreecommitdiff
path: root/2015/12/puzzle-2.sh
diff options
context:
space:
mode:
authorThomas Voss <thomasvoss@live.com> 2021-10-29 23:14:33 +0200
committerThomas Voss <thomasvoss@live.com> 2021-10-29 23:14:33 +0200
commita5abae53a8be58f1b4e19d69d75350b79216f252 (patch)
tree19e0366d6c1ade041bbbbe7c66276c1d68ee3c31 /2015/12/puzzle-2.sh
parente7c9108b95e39d7ea5a29ae06d619c4727f11027 (diff)
Use grep(1) instead of the non-POSIX squash(1)
Diffstat (limited to '2015/12/puzzle-2.sh')
-rwxr-xr-x2015/12/puzzle-2.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/2015/12/puzzle-2.sh b/2015/12/puzzle-2.sh
index e97fc8a..b1e649c 100755
--- a/2015/12/puzzle-2.sh
+++ b/2015/12/puzzle-2.sh
@@ -2,6 +2,6 @@
jq 'walk(if type == "object" then del(select(.[] == "red")) end)' input \
| tr -c '\-0-9' '\n' \
- | squash \
+ | grep . \
| paste -sd+ \
| bc