Linux - GeneralThis 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.
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.
I was hoping someone could help me with a strange situation:
I have a Red Hat Linux 8 installation, all the standard stuff, including perl and am using the bash shell.
I wrote the standard "Hello World" Perl program and attempted to execute it with the command:
The shell replies:
-bash: hello.pl: command not found
The shebang line at the top of the program says:
And the command: which perl tells me:
The file permissions are: -rwxrwxr-x
The programs does run correctly with the command:
> perl hello.pl
I have also used hexdump to look at hello.pl and ensure that it has only newlines (\n) at the end of the lines and not any extraneous carriage returns (\r).
I hope that is enough info to show that I have investigated all the ordinary things that go wrong, but I am still stumped.
BTW: I have also tried running this under bash2, csh and sh ... with the same results. This happens with any .pl or .cgi programs I try to run. All the programs I have also tested on other Unix systems and they run fine.
Oh the explicitness of it all! I'd always heard that one of Linux' strengths was that fact that it was so highly configurable. Apparently that extends to where it looks for a command you tell it to run.
I have added .: to my path in .bash_profile and Perl is a happy camper again!