People here are doing it in Common Lisp and C standard library, meanwhile I’m just sitting here trying to get a curl call to download the data file.
curl "https://adventofcode.com/2024/day/$DAY/input" --header "Cookie: $(cat .token)" > input.txt
#!/bin/sh
set -e
curl "https://adventofcode.com/${YEAR:?}/day/${DAY:?}/input" --cookie "session=$(cat .token)"
then: YEAR=2024 DAY=1 ./aocdata