adventofcode2024/day19/sol.sh

9 lines
136 B
Bash
Executable File

#!/bin/bash
file="$1"
designs=$(sed -n '1s/, /|/gp' <"$file")
echo $designs
sed -e '1,2d' <"$file" | grep -E "^($designs)*$" | wc -l