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!
Notices
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.
OK, here is a fun one. I have a shell-script program that was written on Slackware 2.0 or previous kernel. I have installed this same exact program on a Slackware 9.0 system. The original system that was configured acts a little differently than the new system, but I do not know if this is because of the version difference of Slackware or some user environment setting or other environment flag that has been configured on the old system.
Here is what is going on. The program has a line in it as follows:
I know, I know, what a mess. But, the important piece is the last line, "...2.2f\\\n\",$inum,$amount..."
The output of this on the original system looks like this:
6 3 0.10 100.00 ID0006 ITEM 6 ~1 @ 100.00
The output of this on the new system looks like this:
6 3 0.10 100.00 ID0006 ITEM 6 ~1 @ 100.00\n
Note the "\n" tacked on the end. For the life of me, I cannot figure out why this is doing one thing on the original system and another on the new system. Can anyone provide any insight whatsoever into what is going on here? It is the EXACT same code running on both systems. The only differences are the version of Slackware and whatever environment settings may have been set by the guy who wrote the program (who is now dead, so I cannot ask him)
I don't have either version of Slackware, so I can't test this. I would assume it's simply a different parsing routine between different version of whatever interpreter you're using (bash, tcsh, perl, or whatever). I would be willing to bet you simply need to remove one of the backslashes to get it to run on the newer system.
If that "fix" works, but don't like the idea of having two different version floating around, you'll have to make the script smart enough to find out what version of Slack it's running on, and execute the appropriate version of the command
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.