i have a bash script I edit on windows using UltraEdit and save as UTF-8 No BOM, using Unix Line Terminator style, as specified in the "save as" dialog box in UE.
I then upload it to a centos 5 x86 machine running parallels virtuozzo, and everytime, no matter how i upload it (FTP as binary file, or via parallels management console), the script wont work. When i view the script via parallels management console i see that the LAST, and ONLY the last line, has a weird character in it. If i remove the line terminator from the last line (let the script end at the last printable character) everything works fine.
My questions:
A) why is only the LAST line terminator causing problems?
B) how do i avoid this in the future?
thanks!