LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-06-2010, 02:11 PM   #31
sundry_50
Member
 
Registered: Jan 2005
Distribution: knoppix/debian
Posts: 38
Blog Entries: 2

Rep: Reputation: 11

Thanks mwdmarco. Deleting the #! /bin/bash line is the only thing that worked for me in a Ubuntu 9.10 VM.
 
Old 12-08-2010, 03:51 AM   #32
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,640

Rep: Reputation: Disabled
Quote:
Originally Posted by sundry_50 View Post
Thanks mwdmarco. Deleting the #! /bin/bash line is the only thing that worked for me in a Ubuntu 9.10 VM.
But why? Anybody any idea?
 
Old 01-26-2011, 12:37 PM   #33
scnicejoe
LQ Newbie
 
Registered: Nov 2010
Posts: 1

Rep: Reputation: 0
wbrummet...thanks. That fixed it!
 
Old 02-09-2011, 10:22 PM   #34
synthesisor
LQ Newbie
 
Registered: Jul 2007
Posts: 1

Rep: Reputation: 0
Quote:
Originally Posted by jlliagre View Post
Depending on the vi clone you are using, the carriage return may or may not be displayed. To be sure, run:
Code:
head -1 scriptFile.sh | od -c | head -1
and check if the output looks like
Code:
0000000   #   !   /   b   i   n   /   s   h  \n
yes, for my case - i got error ": bad interpreter: No such file or directory" when run script. below is the output of command above:

[root@D04 tmp]# head -1 reset.sh | od -c | head -1
0000000 # ! / b i n / b a s h \r \n

there is "\r" there. so i make a new script by copy n paste each of them and it turns to:

[root@D04 tmp]# head -1 reset.sh | od -c | head -1
0000000 # ! / b i n / b a s h \n

now, "bad interpreter" was gone..

--
tganu 2011
 
Old 10-07-2013, 03:11 AM   #35
fider
LQ Newbie
 
Registered: Oct 2013
Posts: 1

Rep: Reputation: Disabled
Incorrect encoded new line character

I had similar problem (two files in same dir - first run without problems, second not).

In my case error message 'no interpreter' contains also '^M' string - my line break in file was coded in windows not unix standard

Last edited by fider; 10-08-2013 at 04:33 AM. Reason: First answer was so stupid :)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
"bad interpreter : no such file or directory" when configure "flex" acer_peri Linux - Software 10 11-10-2010 01:19 AM
: bad interpreter: No such file or directory ciberrust Linux - Networking 10 09-09-2010 06:51 AM
: bad interpreter: No such file or directory lnx8 Linux - General 4 04-29-2004 02:56 AM
bash: ./fam_mirror: bad interpreter: No such file or directory linuxboy69 Linux - Software 5 12-22-2003 11:35 AM
bash: ./myscript: bad interpreter: No such file or directory Stefangeelen Linux - Newbie 3 09-05-2002 01:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration