xxxxxxxxxx
# This is caused by Windows-style line endings. To fix:
sed -i 's/\r$//' <file>
# OR with vi
:%s/\r$//
:x
# OR with dos2unix
sudo apt-get install dos2unix
dos2unix <file>
xxxxxxxxxx
Inside WSL:
sudo apt-get install dos2unix
Then,
dos2unix [file]
Full documentation:
man dos2unix
#mdem
dos2unix test.sh