I'm trying to log into a website using the auth cookies , using the techniques described in I'm reading through https://www.apharmony.com/software-sagacity/2014/10/using-wget-with-cookies/ .
I'm trying to turn my task into a bash script which I will use with git-bash. So far I have the tested wget with the cookies directly at the command line and the login works using:
wget --header "cookie: _ga=GA1.2.3865356.1523153047; ......" www.mysite.com
However in the Bash script , I have:
COOKIES="cookie:_ga=GA1.2.3865356.1523153047; ...."
wget --header $COOKIES www.mysite.com
This does not work. What am I doing wrong in the bash script?