当前位置:网站首页>bad interpreter:No such file or directory

bad interpreter:No such file or directory

2022-06-10 02:43:00 Crazy banana Nicky

Linux perform shell Script
newspaper bad interpreter:No such file or directory error !
reason :
.sh Script in windows Written under the system , So there may be invisible characters Most likely, the script file is DOS Format , That is, each line ends with \r\n To mark , Its ASCII The codes are 0x0D, 0x0A.
resolvent :
1) adopt vim filename perhaps vi filename Enter editor
2) And then through shift+: Enter command mode . Then by order set ff perhaps set fileformat View file format .
3) Modify file format dos by unix. Through the command set ff=unix or set fileformat=unix modify , And then execute set ff perhaps set fileformat, Check whether the modification is successful .
4) Start command , Found normal startup , That's it .

原网站

版权声明
本文为[Crazy banana Nicky]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/161/202206100239189722.html