aoc-2022/06/02.sh

14 lines
188 B
Bash
Executable file

#!/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