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.
it just kinda makes no sense at all, in many ways, I'm afraid. what do you expect it to do? the echo command is being tagged onto the end of the assignment execution, you're following the tail, that command will never finish... drop the idea of assigning the sed output to anything, i'm sure your output can easily be made to fall out the end, do you now just want a grep after it maybe?
What i want, is to take sed's output (an email address) and "post" that address to an external script that will -in turn- insert that email address to a database. Sorry for my poor bash skills, i just feel certain that it can be done somehow. No?
tail -f /var/log/mail.log | grep to= | sed -nr 's/.*to=<([^>]*)>.*/\1/p'
This also prints email addresses on the screen (quite natural, since you made it ..) and still leaves me wondering how would i go about with "posting" the result of grep to an external script. Again, sorry for my poor knowledge of bash scripting (i am getting better by the minute, hanging out with you people..).