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!
firstly i would recommend you transfer as binary.. since you seem to know exactly the format you want..
ASCII/text FTP is known for doing line-ending conversion when you dont want it too.
you can just run dos2unix to get rid of them..
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With