Linux - NewbieThis 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!
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.
It doesn't tell me much to be honest. I was expecting to see either a problem with your #! line or incorrect permissions on the perl binary. The only other thing I can suggest is write yourself a little script from scratch that's just say
print "Hello world\n";
and try running that instead and see if you get the same error.
The ^M characters (really CTRL-M, but displayed as ^M) come into play when transfering a file from Windows to Linux/Unix. Windows and Linux/Unix deal with the end-of-line and carriage-return differently. You are probably getting the bad interpreter error because it's looking for perl^M instead of perl. If you have them, you might want to run dos2unix on the file or use your favorite sed expression to remove them.
hello worlds works, and since I couldnt find any ^M's I thought well, if its any possible linux to windows thing, I'll go redownload the file from the "linux" site, and now everything works. Any idea as to why I didnt see any ^M. Not even after the shebang?
^M is a "hidden" or "unprintable" character. It's a carriage return. You need to make sure that whatever editor you use has a "show hidden characters" mode. ^M are introduced typically when you fetch a file from a Windows system to a Unix/Linux system.
when I used vi, I didnt see any ^M . Is there a way to have "show hidden characters" on vi? If so, how? I have a whole bunch of cgi files I want to transfer to this nix box, would it be easier to look for all the ^M's, or a dos2unix, if so.... What's the proper way to use dos2unix, just cd to the directory, and dos2unix filename.cgi??