Move to have day be 2 digit always
[advent-of-code-2020.git] / day06 / static / gitweb.js
diff --git a/day6/get_yes_counts.sh b/day6/get_yes_counts.sh
deleted file mode 100644 (file)
index b91205c..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/bin/bash
-
-set -u
-set -e
-
-declare -a group_questions
-
-parse_file() {
-    exec 3<input.txt
-    declare -A questions
-    while read -u 3 line; do
-        #remove new lines
-        line=${line//$'\r'//}
-        line=${line//$'\n'//}
-        # go through each character of line
-        if [ "$line" == "" ]; then
-            question_string=""
-            for key in "${!questions[@]}"; do
-                question_string+="${key}"
-            done
-            group_questions+=($question_string)
-            unset questions
-            declare -A questions
-            continue
-        fi
-        for (( a=0; a<${#line}; a++ )); do
-            question=${line:$a:1}
-            questions["$question"]=1
-        done
-    done
-
-    # last line was hit, so we need to process that too
-    question_string=""
-    for key in "${!questions[@]}"; do
-        question_string+="${key}"
-    done
-    group_questions+=($question_string)
-    unset questions
-}
-
-parse_file
-
-sum_of_groups=0
-for group in "${group_questions[@]}"; do
-    sum_of_groups=$((sum_of_groups+${#group}))
-done
-
-echo "Sum of groups: $sum_of_groups"