-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 10/12/2010 02:23 PM, joshua stein wrote:
>> But is there any better ways to work it out ?
>
> you could get the ip of the interface that the default route is
> going through:
>
> route -n get default | grep 'if address' | sed 's/.*: //'
>
> or ask ifconfig what is in the egress group and assume the first ip
> on the first interface will be ok:
>
> ifconfig egress | grep 'inet ' | head -n1 | awk '{ print $2 }'
>
Great , thanks !
- --
Best Regards,
Aaron Lewis - PGP: 0xDFE6C29E
Key Server: http://keyserver.veridis.com
Finger Print: 9482 448F C7C3 896C 1DFE 7DD3 2492 A7D0 DFE6 C29E
No HTML shits , thanks.
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQIcBAEBAgAGBQJMtAb2AAoJECSSp9Df5sKe040P/A7ILmwdfd5MWBf08NYLcelj
SLQsU4NrhdIUNI41MFQgd4MTQ4JFUbZCdndom0TEOB467dQeYRdfslT1JSV9B13l
1zyNYODnqNp95a9uRCKVagR++oK7Ni6GaPXLhAnOh3WA+ZLi+ncNtDF3tl16GwpH
tnC5Og8MBtMeG9zGM54SHpCRUNHW9O6iPBOhV1O9l8VcBkiiIn7c0TenFLdVxgxT
wtKRslbtvxg7iliNJ9hqstdgyvfyuDw09Kh+TQnye3iN4PzzA2KrPKoknjkbfOv8
9OuQ/HCXFBUUpoq9SPmz1XxJJwzghZQNxP6Gvufk8GTePXf47XkZxOuLSrA7xXaU
bTYCTqT8xwLIOpeixpiPYuB9XMUPIFOJwDHA2OfFex7BDrc+HDreGLwq7YkkpWo0
TpSCrDBCXCbgpN9PHBI4bY6N4Ld0g9We5HWiUDmhjPp2dXVw+u2958caWJrJfs9y
KQzeKXCIpfhDVUdqeldHHLxVPSEDhxiPnFP8xhNDDzxIL+yZoaQwSH/MT5+4/3FJ
eeXnieRpy3i1Q1CmpLKIuGDW8j3EBYPNnZIdIzobfLwdrRfz+C6uiqCBD9UkJTBJ
59aS02I5pIAR+Ja7USFU5iL7fR0QrrUYVgVB3XqNKrjIZdnleZ2FyAUUA6SyvLsW
5Gtluza4OXRRgYK9dr7I
=YkqU
-----END PGP SIGNATURE-----