diff options
| author | June McEnroe <june@causal.agency> | 2018-12-02 00:49:25 -0500 |
|---|---|---|
| committer | June McEnroe <june@causal.agency> | 2020-11-22 00:14:25 -0500 |
| commit | 5440efe45bce5b4663ffc44d5033781f3f6c39e9 (patch) | |
| tree | 669cee9551e6524e6a66462954b4287f3a214e80 /2018/day02-2.sh | |
| parent | Solve day 2 part 2 (diff) | |
| download | aoc-5440efe45bce5b4663ffc44d5033781f3f6c39e9.tar.gz aoc-5440efe45bce5b4663ffc44d5033781f3f6c39e9.zip | |
Un-hardcode width of input in day 2
Diffstat (limited to '2018/day02-2.sh')
| -rw-r--r-- | 2018/day02-2.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/2018/day02-2.sh b/2018/day02-2.sh index c7876cb..ef8bcc2 100644 --- a/2018/day02-2.sh +++ b/2018/day02-2.sh @@ -1,6 +1,6 @@ input=$(mktemp) cat > $input -for i in $(seq 26); do +for i in $(seq $(head -n 1 $input | wc -c)); do colrm $i $i < $input | sort | uniq -d done rm $input |