aboutsummaryrefslogtreecommitdiff
path: root/2016/04/puzzle-1.sh
diff options
context:
space:
mode:
Diffstat (limited to '2016/04/puzzle-1.sh')
-rwxr-xr-x2016/04/puzzle-1.sh15
1 files changed, 0 insertions, 15 deletions
diff --git a/2016/04/puzzle-1.sh b/2016/04/puzzle-1.sh
deleted file mode 100755
index 67ccb7c..0000000
--- a/2016/04/puzzle-1.sh
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/sh
-
-# This is slow, but it’s fun! That’s what counts!
-
-while IFS='[]' read -r line cksum; do
- sid=`echo $line | grep -o '[0-9]*'`
- echo $line \
- | tr -d -- '-0-9\n' \
- | sed 's/./&\n/g' \
- | sort \
- | uniq -c \
- | sort -k1nr \
- | head -n5 \
- | awk "{ s = s \$2 } END { if (s == \"$cksum\") print $sid }"
-done <input | awk '{ s += $0 } END { print s }'