extract IP address and feed it into a command
dj_boris at mail.ru
Mon Apr 28 14:59:24 PDT 2003
I am running fBSD 4.7 release.
I need to extract my IP address which is dynamically assigned by my ISP and
feed it into a serialmail command
"maildirsmtp ~alias/pppdir alias-ppp- 220.127.116.11 `hostname` "
which is executed from my ppp.linkup.
I have to replace hostname with my dynamic IP.
I know that my IP always starts with zzz.zzz and if I run
"ifconfig | grep zzz.zzz"
inet zzz.zzz.xxx.xxx --> yyy.yyy.yyy.yyy netmask nnnnnnnnnn
Is there a command or something else that I can use in order to get only the
IP starting with zzz.zzz up to the first space and how do I feed it into the
More information about the freebsd-questions