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.
I have a question on how to exclude my echo result, currently I'm having a script running:
echo "parameter Value =" $mc_parameter_value >> $TMPFILE
the value is actually causing a problem for me, since the result is giving me unnecessary result, If i have a "*" in the string then it will actually echo the directory content and i don't want this...
So basically I want to exclude reading the "*" in the line.
Since * is a wild card if I put a simple exclusion putting * in there won't it just ignore the whole thing? any one have any idea of doing this?
Please provide more details on how you set the $mc_parameter_value variable.
It would help if we could replicate your results.
If the asterisk is separated by spaces, then evaluating the variable will have the asterisk expand to the files in the directory.
For example: value="abc * def" will will have the asterisk expanded.
For "abc*def", "abc* def", "abc *def" it won't be.
If you put the variable inside double quotes, then the asterisk isn't expanded:
echo "parameter Value = $mc_parameter_value" >> $TMPFILE
Hmmm actually I have never tried to have the not asterix separated, but actually I don't have any control over how the string will look like.
But the value of the parameter value is actually passed over by other application which reads through a content of log then this script will actually capture it and passing it so an email will have this parameter value.
Monitoring log application will search for a string "abc * abc", the string matched in a log will trigger a notification and pass it to event monitoring application, from that application the information will be pass over to an email, and this script is filling the information inside that mail.
echo "parameter Value = $mc_parameter_value" >> $TMPFILE is only part of the script.
And yes when the script is echo ing the $mc_parameter_value since it has * in there, it actually echo ing the content of the directory where the script reside.
If you are replying to questions can you please quote them inline so that we can follow what your have answered. It's hard to tell what is your text, where you are quoting someone else, where you are answering specific questions etc.