Yenthe666 / InstallScript

Odoo install script
MIT License
1.22k stars 1.55k forks source link

.sh:行22: $'\r': 未找到命令 #433

Open leangjia opened 1 month ago

leangjia commented 1 month ago

linux执行sh脚本报错:$’\r’: 未找到命令的解决

chris001 commented 1 month ago

When you see error messages like this:

-bash: '\r': command not found

Try running the dos2unix command on the file.

Why? Windows style newline characters cause this error in Linux.

The dos2unix command modifies the newline characters so they are Linux compatible.

(CAUTION: the dos2unix command modifies files in place, so take precaution if necessary. If you need to keep the original file, you should make a backup copy first.)

Then, you can run the .sh file without that error.