Click to See Complete Forum and Search --> : What Does This Do?


MrNewbie
01-04-2001, 05:38 PM
I saw this in someones signature:

What part of /sbin/ifconfig ppp0|grep inet|sed -e s/addr:// -e s/inet// -e s/P-t-P:// -e s/Mask:255.255.255.255// don't you understand?
And the answer to the question is, well, all of it hehe. What does it do?
Thanks
MrNewbie

henri
01-08-2001, 11:28 AM
it just extracts, in this order, your IP address, three spaces and the IP address of the computer you are connected to through Point to Point Protocol (ppp) namely trough your modem or ADSL link.
to see what it does you just have to connect to your ISP and execute the commands :

/sbin/ifconfig ppp0
then
your full command
nice hey ?

Strike
01-08-2001, 12:34 PM
Yeah, tminos stole that idea from me (not that I would have used it, but I found the script).