I need to get the internet ip address. For now i want to get it using the linux terminal, so i type "ifconfig". I'm connected by my android phone via thetering, and i've noticed there's not my internet ip address in the output of "ifconfig".
usb0 Link encap:Ethernet HWaddr 6a:22:38:4d:92:36
indirizzo inet:192.168.42.79 Bcast:192.168.42.255 Maschera:255.255.255.0
indirizzo inet6: fe80::6822:38ff:fe4d:9236/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:31359 errors:4 dropped:0 overruns:0 frame:4
TX packets:27688 errors:0 dropped:0 overruns:0 carrier:0
collisioni:0 txqueuelen:1000
Byte RX:30033107 (30.0 MB) Byte TX:4855114 (4.8 MB)
This is the output of the command "ifconfig". Is there a universal way to get the ip address, by script commands or by "c" functions?