Created
December 1, 2022 13:38
-
-
Save ms747/8ed06b1ee455ffa48a086e19f4910225 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# USAGE | |
# ./aoc_get_input [day_number] >> input.txt | |
SESSION="session=?????" | |
if [ -z "$1" ] | |
then | |
echo "No argument supplied" | |
else | |
URL="https://adventofcode.com/2022/day/$1/input" | |
curl --cookie "$SESSION" "$URL" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment