ChinaUnix.net
相关文章推荐:

vboxlinuxadditions bad interpreter

Since moving the sites over to the new CentOS web server a couple of days ago, I began testing some existing bash scripts that I had copied over from the old server today. When I executed the first script, it failed, giving me this error message : bad interpreter: No such file or directory! I figured I must have 'missed' a few lines when I did the copy and paste operation, but everything c...

by niubro - Linux文档专区 - 2008-06-11 16:19:03 阅读(536) 回复(0)

相关讨论

估计这种问题非常常见!

by sasal - Perl - 2004-06-22 11:44:43 阅读(2160) 回复(2)

本来想发在linux版,可是搜索了一下,04年和06年有两个同样问题的帖子,都没得到解决。想了想这里高手多,还是发这里吧。 centos5.5 2.6.18 今天top一下,没有反应,提示符加粗!我觉得出事了,就直接去机房,登入察看服务(有图形界面,平时不开)。点“服务”没反应,命令启动返回一堆错误。监视器里面其他cpu很淡定,CPU3忽高忽低。这台服务器还没投入正式使用,重启吧。 重启过程中就出现许多如下错误: sh: /usr/bin/(swapd...

by 昭襄王 - Shell - 2012-09-20 19:38:24 阅读(22566) 回复(33)

问题原因:一般是由于文件中有Linux不支持的windos/dos的字符(i.e. "\r\n" instead of "\n") , 解决办法:使用dos2unix进行转化, 命令格式:/usr/bin/dos2unix -o 命令示例:      [jay@yumie ~]$ /usr/bin/dos2unix -o ./backup_db dos2unix: converting file ./backup_db to UNIX format ... 自: http://www.gidnetwork.com/b-91.html 本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/225...

by myTechBlog - Linux文档专区 - 2008-03-07 13:02:19 阅读(653) 回复(0)

bad interpreter错误 在windows中写的shell,然后上传到测试机中,windows中的行结束符是\r\n,回车符+换行符,而在unix中,行结束符是\n,即换行符.因为这个而导致的错误. 好了,那么在unix下如何判断一个文件是dos格式还是unix格式,通过查找和测试,有以下三种方法: 1. 在vim命令模式下 :set ff 即会在屏幕下方出现fileformat=unix/dos 2. 如果你的机器装了joe,可以通过joe file查看文件内容,如果文件内容中有^M字符时,即表示为dos格式...

by wellnp - Linux文档专区 - 2007-07-25 23:40:38 阅读(551) 回复(0)

出现bad interpreter:No such file or directory的原因是文件格式的问题。这个文件是在Windows下编写的。换行的方式与Unix不一样,但是在VI下面如果不Set一下又完全看不出来。 解决方法: 1、上传到linux主机运行 chmod +x back ./back 错误提示如下: bash: ./back : bad interpreter:No such file or directory 2、错误分析: 因为操作系统是windows,在windows下编辑的脚本,所以有可能有不可见字符。 从你的...

by wangbinde - Linux文档专区 - 2008-10-24 15:27:37 阅读(590) 回复(0)

以下内容来自朋友的Blog 错误提示如下: bash: bad interpreter:No such file or directory 错误原因: 操作系统是windows,在windows下编辑的脚本,所以有可能有不可见字符。 脚本及报告的错误看来, 很有可能是你的脚本文件是DOS格式的, 即每一行的行尾以\r\n来标识, 其ASCII码分别是0x0D, 0x0A. 可以有很多种办法看这个文件是DOS格式的还是UNIX格式的, 还是MAC格式的 解决办法: vi filename 然后用命令 :set ff...

by pop_star - Linux文档专区 - 2008-07-05 09:31:41 阅读(766) 回复(0)

出现bad interpreter:No such file or directory的原因是文件格式的问题。这个文件是在Windows下编写的。换行的方式与Unix不一样,但是在VI下面如果不Set一下又完全看不出来。 解决方法: 1、上传到linux主机运行 chmod +x back ./back 错误提示如下: bash: ./back : bad interpreter:No such file or directory 2、错误分析: 因为操作系统是windows,在windows下编辑的脚本,所以有可能有不可见字符。 从...

by ★贰℡叁★ - Linux文档专区 - 2008-01-15 11:56:22 阅读(535) 回复(0)

【linux脚本】bad interpreter: No such file or directory Posted on 2007-08-30 19:14 kooyee 阅读(80) 评论(0) 编辑 收藏 所属分类: Lniux/Unix --> 一般来说,在windows用建立的sh文件在linux中运行时,因为window在每行后加入隐藏字符^M 所以当linux编译时 由于无法编译^M而导致bad interpreter错误 1>使用 vi -b 找出^M 然后删除。 2>dos2unix filename 本文来...

by zsfly - Linux文档专区 - 2007-12-26 17:32:34 阅读(816) 回复(0)

#!/bin/sh #name: cleanup #this is a general cleanup script #the script be used to clean the expire file for fmode client echo "starting cleanup...wait" for files in "find /home/heql/c/1.0 -mtime +3 -print" do rm $files done echo "finished cleanup" 以上是我的shell代码,我第一次写,不知道是哪里写错了,望高手指点!谢谢! : bad interpreter: No such file or directory这个错误该怎么修改?

by cheeralen - Shell - 2004-09-06 11:36:49 阅读(1394) 回复(4)

linux 脚本不执行,出现错误bad interpreter: No such file or directory 出现bad interpreter:No such file or directory的原因 是文件格式的问题。这个文件是在Windows下编写的。换行的方式与Unix不一样,但是在VI下面如果不Set一下又完全看不出来。 解决方法: 1、上传到linux主机运行 chmod +x back ./back 错误提示如下: bash: ./back : bad interpreter:No such file or directory 2、错误分析: 因为...

by sjhf - Linux文档专区 - 2009-03-23 11:16:08 阅读(563) 回复(0)