Windows carriage returns inside shell scripts
'\n' writes a new line in UNIX while in Windows there are two character sequence
It may cause some problems if windows-like sequence presented in shell scripts. No matter what is the reason.
They way of “cleaning” scripts from
'\r' is next:
sed -i.bak 's/\r//g' /the/path/to/your/script/yourscript.sh
This command makes new cleaned file and save old one as is with adding “.bak” extension.