Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 04-07-2002, 04:01 PM   #1
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

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, 06:37 PM   #2
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, 09:56 PM   #3
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, 07:31 AM   #4
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677
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.


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

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

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