diff --git a/06/02.sh b/06/02.sh new file mode 100755 index 0000000..8e0eff8 --- /dev/null +++ b/06/02.sh @@ -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 diff --git a/06/README.md b/06/README.md index df50890..17f9497 100644 --- a/06/README.md +++ b/06/README.md @@ -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...