Skip to content

Instantly share code, notes, and snippets.

@ms747
Created December 1, 2022 13:38
Show Gist options
  • Save ms747/8ed06b1ee455ffa48a086e19f4910225 to your computer and use it in GitHub Desktop.
Save ms747/8ed06b1ee455ffa48a086e19f4910225 to your computer and use it in GitHub Desktop.
#!/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