/bin/sh^M: bad interpreter: No such file or 異常

http://www.blogjava.net/nkjava/archive/2009/06/10/281064.html
html


2)也可在Linux中轉換: 
java

首先要確保文件有可執行權限  
#sh>chmod a+x filename 

而後修改文件格式  
#sh>vi filename 

利用以下命令查看文件格式  
:set ff 
 :set fileformat 

能夠看到以下信息  
fileformat=dos 
 fileformat=unix 

利用以下命令修改文件格式  
:set ff=unix 
 :set fileformat=unix 

:wq (
存盤退出

最後再執行文件   #sh>./filename
相關文章
相關標籤/搜索