Numbers where seen as octal numbers.
read_cookie
curl -o input/$DAY.txt \
-H "Cookie: session=$COOKIE" \
- "https://adventofcode.com/2025/day/$(printf "%d" ${DAY/day/})/input"
+ "https://adventofcode.com/2025/day/${N}/input"
}
get_html() {
read_cookie
curl -o html/$DAY.html \
-H "Cookie: session=$COOKIE" \
- "https://adventofcode.com/2025/day/$(printf "%d" ${DAY/day/})"
+ "https://adventofcode.com/2025/day/${N}"
}
do_test() {
while [ $# -ge 1 ]; do
DAY=$1
echo "day: $DAY"
+ N=${DAY/day0/}
+ N=${N/day/}
[ $DO_HTML -eq 1 ] && get_html
[ $DO_INPUT -eq 1 ] && get_input
[ $DO_RUN -eq 1 ] && do_run