Saving the contents of a bash curl call is pretty easy.
Variables in bash work something like this.
Capturing input is relatively easy too.
If you echo’d out the contents of
variable, you’d print out whatever was in the directory when you ran the command.
So if you put the two together along with curl, you get the answer.
Now, if you echo’d out the contents of
variable again, you’ll see a gigantic log file! No, not really, but obviously you’ll see the contents of whatever file you want to curl.