Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Well there can be many reasons why an interpreter isn't present. Just because you are running the script in bash doesn't mean it will use that interpreter. The first line of the file tells it which interpreter to use, something like:
If perl happens to have been installed in a different location then that wouldn't work. But it has to be something else because then you would get an error message something along the lines of file not found. Unless the interpreter itself wouldn't be executable, but that's very unlikely. And you said you've changed the permissions on the script itself too.
The weird thing is that it's complaining about the interpreter and not the script itself. Are you able to run the interpreter just by itself as the same user?
Well if it's a shell script then don't try to run it with the perl interpreter because that won't work. If you are going to change it to anything change it to /bin/bash instead since you said you are running that shell. So it must work. I've tried in different ways to get the same error as you did. But the only way I can get a permission denied is if I clear the executable bits on /bin/sh. To run a shell just type the full name in a terminal. Like /bin/sh to run sh, or /bin/bash to run bash.
The only thing I can think of is that you've maybe got some weird characters in your script which are causing it to go bogus. Try running the following commands to see if you can run simple scripts. Just type these lines out one by one. If after the last command you get to see the word ok then everything is fine.