Pergunta

I made a script that renames a folder.

sudo mv MyFolder MyFolder20130610

I run my script and when I see the new folder from console (with ls) I see:

MyFolder20130610?? instead of MyFolder20130610

What am I doing wrong?

Thanks

Foi útil?

Solução

Your bash script has Windows newlines. Convert to Unix newlines with dos2unix or similar utility.

If that doesn't help, open your script in a hex editor and remove the stray bytes at the end of that line.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top