LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   pipe commands into processes (https://www.linuxquestions.org/questions/linux-newbie-8/pipe-commands-into-processes-3950/)

acren 07-04-2001 08:59 AM

pipe commands into processes
 
I need to get to know what ip adress I have. Therefor I use telnet ( list /status/ppp-statistics/rx-options/ipcp/dsl1 ).

How can I make a srcipt that shows me the lines that are shown by the telnet client.
I tryed something like that ( echo "list /status/ppp-statistics/rx-options/ipcp/dsl1" | telnet 10.1.1.1 ), but it didn't work.

Does s.o. know how to do it?

Thx acren

jharris 07-04-2001 10:08 AM

What do you need to do with it then? Is it so you can get to your server externally? If this is the case then you can always register a name with DynDNS (http://www.dyndns.org) that will follow your IP around when it changes, or you could run something like
Code:

cat /status/ppp-statistics/rx-options/ipcp/dsl1 | mail someaddress@yahoo.com
so you get emailed your IP address.

Just a few thoughts, I don't know how much sucess you will have trying to script a standard telnet package... you might be able to do something similar with Perl, but you'd have to write the telnet part of it yourself I believe...

good luck!

Jamie...


All times are GMT -5. The time now is 09:52 AM.