From e69c0f08d018c5f2144c9a55d63173d6973d1535 Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Sun, 2 Dec 2018 00:49:25 -0500 Subject: Un-hardcode width of input in day 2 --- 2018/day02-2.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit 1.4.1