I'm practicing some scripts from a book and I keep getting an unexpected end-of-file syntax error. The images below show the error message and the script that uses basic commands to create a system-information html file. The second set of images show my attempt to comment out the problematic lines and run it.
In the top part I have three functions that use here-documents to generate html tags, I'm using the '<<-' switch to allow me to indent the tags for readability. My issue is that the error I mentioned keeps popping up. If I change it to 'echo' commands it works just fine, the weird part is I have a here-document at the bottom of the script, outside of a function and that works just fine if I comment out the three functions. What I am I doing wrong?