LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Getting AND filtering the output of "wvdial" (http://www.linuxquestions.org/questions/linux-software-2/getting-and-filtering-the-output-of-wvdial-116990/)

rkrijger 11-17-2003 09:02 AM

Getting AND filtering the output of "wvdial"
 
My software program has a script that invokes wvdial to connect to a remote PC. However, I would like to display the output of wvdial in my user-interface.

I succeed in doing this by using:

wvdial john > /home/rdk/messages 2>&1

messages is a pipe that I scan in my software and display in my UI...

BUT...

This gives me too much info, I would like to filter some of the output of wvdial and ONLY display the following messages

"Connected..."
"No Carrier! Trying again."
"The line is busy. Trying again."

All other messages should be ignored.
How do I achieve this?!?
I prefer to solve this in a script and not in the software that scans and displays the messages pipe...


All times are GMT -5. The time now is 09:03 PM.