+ day 06, part 2
parent
e73fd9a4c7
commit
ac61cc6a44
|
@ -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
|
|
@ -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...
|
||||
|
|
Loading…
Reference in New Issue