adventofcode2024/day19/sol.sh

9 lines
136 B
Bash
Raw Permalink Normal View History

2024-12-19 05:24:17 +00:00
#!/bin/bash
file="$1"
designs=$(sed -n '1s/, /|/gp' <"$file")
echo $designs
sed -e '1,2d' <"$file" | grep -E "^($designs)*$" | wc -l