質問

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

役に立ちましたか?

解決

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.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top