bash $'\r': command not found code example
Example 1: run.sh: line 39: $'\r': command not found
sed -i 's/\r$//' filename
Example 2: $'\r': command not found
Inside WSL:
sudo apt-get install dos2unix
Then,
dos2unix [file]
Full documentation:
man dos2unix
#mdem
dos2unix test.sh
Example 3: $'\r': command not found
sed -i 's/\r$//' filename