I am currently doing setup of AWS for fast.ai course part 1 , I managed to get to some place but, I kept on getting this error when I try to execute the bash, below is the error. I manged to fix it, hence below is the solution for everyone’s benefit.
bash setup_p2.sh setup_p2.sh:line 7: syntax error near unexpected token `newline' setup_p2.sh: line 7: `<!DOCTYPE html>'
Why the ” error near unexpected token `newline’ ” ?
The simple reason is that when you do the wget, it is downlading the HTML file that has the <!Doctype html>, so thats the error. When you try to the below with wget, the wget is downloading the html of the github or the other place, so it keeps giving this error.
How to fix the error ?
It is simple, you download the setup_p2.sh file and the entire folder of the setup (https://github.com/fastai/courses/tree/master/setup) as there are dependent files and then run them locally. Meaning you just type bash and drag the file in the terminal of mac, it will work.
That’s it folks, did you had any issues ?