Hello
ifconfig return :
eth0 Link encap:Ethernet HWaddr 11:24:1D:C1:99:BA
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:37307 errors:0 dropped:0 overruns:0 frame:0
TX packets:27319 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:31305813 (29.8 Mb) TX bytes:2229012 (2.1 Mb)
Interrupt:43 Base address:0x4000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:164 errors:0 dropped:0 overruns:0 frame:0
TX packets:164 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:20420 (19.9 Kb) TX bytes:20420 (19.9 Kb)
I would like somethings like
ADRESSE=$(ifconfig | sed -n '/addr:/,/Bcast:/p')
echo $ADRESSE
192.168.0.1
Help would be appreciated