From 554747afc40e410aabfe04ea8649dd086a0bf298 Mon Sep 17 00:00:00 2001 From: Curtis 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(-) (limited to '2018/day02-2.sh') 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