+ day 06, part 2

meow
Dominique Liberda 2022-12-09 13:48:10 +01:00
parent e73fd9a4c7
commit ac61cc6a44
2 changed files with 21 additions and 0 deletions

13
06/02.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/bash
x=()
i=0
while read -n1 a; do
x=(${x[@]:0:13})
x=($a ${x[@]})
i=$((i+1))
[[ $(echo ${x[@]} | tr ' ' '\n' | sort | uniq | wc -l) == 14 ]] && break
done < /tmp/06
echo $i

View File

@ -3,3 +3,11 @@
# part 1
*yawns*
# part 2
*yaaawns*
The only fun thing about this day was how I tackled the array compare :p
supposedly day 7 is more interesting...