I've come across this
http://johanlouwers.blogspot.com/2011/03/linux-check-interface-status.html
But this isn't helping me:
right now I'm on wifi only but when I run ifconfig I get this for eth0
(my lan card)
eth0 Link encap:Ethernet HWaddr 00:41:70:52:5c:59
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:46 Base address:0x2000
so that grep UP will return 1 even if cable isn't plugged in.
But i found ethtool which does what I need so thank you for your help.
S
On 2012-04-07 01:08, Michael Mol wrote: