2023/get_today_puzzle.sh

9 lines
301 B
Bash
Executable File

#!/bin/bash
DAY=`date "+%-e"`
if [ ! -d day${DAY0} ]; then
mkdir day${DAY}
cp template/* day${DAY}
fi
# You have to get your cookie header in text format (Cookie: session=xxxx)
wget --verbose --header "`cat cookies.txt`" "https://adventofcode.com/2023/day/${DAY}/input" -O day${DAY}/input.txt