Se capita un errore del tipo
/usr/bin/bash^M: bad interpreter: No such file or directory
per un file creato sotto Windows, si sistema così
sed -i -e 's/\r$//' scriptname.sh