diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-12-13 14:10:35 +0100 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-12-13 14:10:35 +0100 |
commit | db05329d5c220c2106abef89226ff7ccc251b5c8 (patch) | |
tree | 88058650ad84320e28d61d6541eab92aaf726a5d /2016/04/puzzle-2.sh | |
parent | c84fbdd38f26b25d68cc94f0b60e45a08afea4ec (diff) |
Remove auxiliary files
Diffstat (limited to '2016/04/puzzle-2.sh')
-rwxr-xr-x | 2016/04/puzzle-2.sh | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/2016/04/puzzle-2.sh b/2016/04/puzzle-2.sh deleted file mode 100755 index 3e2c333..0000000 --- a/2016/04/puzzle-2.sh +++ /dev/null @@ -1,23 +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 \"$line\" }" -done <input | \ - while read -r line; do - for i in `seq 25`; do - echo $line | tr $(printf %${i}s | tr ' ' '.')\a-z a-za-z - done - # The call to head(1) allows us to exit the moment we find the - # first match. - done | grep north | grep -o '[0-9]*' | head -n1 -# END PART 2 |