summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2018-12-02 00:49:25 -0500
committerJune McEnroe <june@causal.agency>2018-12-02 00:49:25 -0500
commit554747afc40e410aabfe04ea8649dd086a0bf298 (patch)
tree299f9569665e32816666fdd700f32a01a6a6525c
parentSolve day 2 part 2 (diff)
downloadaoc-554747afc40e410aabfe04ea8649dd086a0bf298.tar.gz
aoc-554747afc40e410aabfe04ea8649dd086a0bf298.zip
Un-hardcode width of input in day 2
Diffstat (limited to '')
-rw-r--r--2018/day02-2.sh2
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