When I copy my bash script across from Notepad++ into a new file with nano editor inside SSH and save. It runs fine. (sh ./install). But if I save the file (Exact same contents), upload to my web server, download it using Wget on the same machine. I get syntax errors. I've checked the encoding and they seem to be the same. I have since used a plethora of character encoding to see if it will resolve the issue. I am also setting the file to executable once I download it using wget!The file runs fine and I have zero errors when copy and pasting using nano. Any idea what this may be? 
Shell script works when saved with nano but not when saved with Notepad++
shell script;windows;newlines
I would be willing to bet that the problem is related to line endings. You're probably going through a non-*nix machine somewhere along the line. I also ran into a problem once where apache (running on Linux) was adding windows style line endings to uploaded text files so you might be seeing something similar. To test, take the file you downloaded and pass it through od. If it's a long file, just grab the first few lines:head script.sh | od -cLook through the output and check if you have anything like this:f   o   o  \r  \nThe \r is a carriage return and on Windows, lines are ended with \r\n as opposed to \n on *nix. If it turns out that this was indeed the problem, you can fix your file by removing the carriage returns:sed -i 's/\r//g' script.sh