LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 04-07-2002, 03:01 PM   #1
Kinstonian
LQ Newbie
 
Registered: Mar 2002
Posts: 29

Rep: Reputation: 15
Bash error


I'm trying to run this script to set up my firewall and i'll type

chmod +x rc.firewall.txt
./rc.firewall.txt

and i'll get this error

Bash: ./rc.firewall.txt: bad interpreter: no such file or directory.

I'm root and in the same directory as the rc.firewall.txt..
 
Old 04-07-2002, 05:37 PM   #2
taz.devil
Senior Member
 
Registered: Nov 2001
Location: Wa. State
Distribution: Slackware
Posts: 1,261

Rep: Reputation: 45
You will want to rename it without the .txt since you can't execute a text file. Go to the file and do:

mv rc.firewall.txt rc.firewall

Now you should be able to run ./rc.firewall start|stop or however this script works.
 
Old 08-08-2002, 08:56 PM   #3
namelocr
LQ Newbie
 
Registered: Aug 2002
Posts: 6

Rep: Reputation: 0
If you are using Linux 7.X, vim is the editor being used.
vim can save a file in both unix and dos format.
When saved in dos format, you will get the 'bad interpreter'
message when trying to run a script that uses the
"#!/path/to/interpreter becasue of the garbage chars in the
file (that vim doesn't show you unless you tell it to).
You can vim the file and issue ":set fileformat=unix" and save.
Then try to execute the script again.
 
Old 08-09-2002, 06:31 AM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
list the command with
ls -l rc.firewall* and see if it is executable. Is the owner and group set correctly?

Try chmod u+x rc.firewall instead.
 
  


Reply



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
-bash: Error on Fedora 1 dr_angus Linux - Newbie 1 03-24-2005 06:13 AM
bash...sh..error linuxtesting2 Linux - General 3 04-16-2004 07:43 PM
Root Bash Error Appleman1234 Linux - General 2 01-23-2004 06:33 PM
su gives bash error Crashed_Again Linux - General 3 04-22-2003 02:19 PM
Help with BASH error Supp0rtLinux Linux - Software 3 03-28-2003 04:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:02 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
Open Source Consulting | Domain Registration