Advent of Code solutions using C99
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

16 lines
340 B

#!/usr/bin/env bash
rm -rf input
for year in {2015..2020}; do
mkdir -p input/$year
for day in {1..25}; do
if [[ day -lt 10 ]]; then
d="0$day"
else
d="$day"
fi
url="https://adventofcode.com/$year/day/$day/input"
curl --cookie "session=$1" $url | perl -pe 'chomp if eof' > input/$year/$d
done
touch input/$year/test
done