LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-25-2005, 02:39 AM   #1
hardeep_ubhi
LQ Newbie
 
Registered: Nov 2004
Location: india
Posts: 13

Rep: Reputation: 0
Question bad intrepreter :No such file or directory


Hello all

I am working on linux advance server. from some days, whenever i am executing a script in linux (oracle script) it is giving me this message.

Bad interpreter: No such file or directory

What i have think is that the directory in which this scripts lies was earlier showing me creation date of jun 2003 and now it is showing me the current date and time.i think, since i have done some modification in the directory using telnet , the ownership has changed or permissions, but the permission, i am seeing r same and also the ownership.

the second reason i think it that , in the script we r using whence command, so linux is unable to find that command and giving me errors.

thanx all for help.
 
Old 01-25-2005, 03:42 AM   #2
scuzzman
Senior Member
 
Registered: May 2004
Location: Hilliard, Ohio, USA
Distribution: Slackware, Kubuntu
Posts: 1,851

Rep: Reputation: 47
You need to make sure the very first line contains the she-bang and the path to your intepreter. Most likely, this is what you'll want:
Code:
#! /bin/bash
Make that the very first line of the script, then make it executable and run it.
That #! is called a she-bang, and the /bin/bash is the path to bash, the intepreter.
 
Old 01-25-2005, 05:53 AM   #3
javahollic
LQ Newbie
 
Registered: Jan 2005
Distribution: SLES8
Posts: 3

Rep: Reputation: 0
Also, check that the script file doesnt have ^M at the end of the #!/bin/bash line, it may not be visible in VI. I've had this once or twice, try catting and moring the file.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
bad interpreter: No such file or directory EcLip$e Linux - General 34 10-07-2013 04:11 AM
: bad interpreter: No such file or directory ciberrust Linux - Networking 10 09-09-2010 07:51 AM
: bad interpreter: No such file or directory lnx8 Linux - General 4 04-29-2004 03:56 AM
bash: ./fam_mirror: bad interpreter: No such file or directory linuxboy69 Linux - Software 5 12-22-2003 12:35 PM
bash: ./myscript: bad interpreter: No such file or directory Stefangeelen Linux - Newbie 3 09-05-2002 02:50 AM


All times are GMT -5. The time now is 08:50 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration