On Tue, 19 Jun 2012 22:16:55 +0100 Adam Bower adam@thebowery.co.uk allegedly wrote:
On Tue, Jun 19, 2012 at 10:27:59AM +0100, Mark Rogers wrote:
This works: mac=$(ifconfig eth0 | grep -Eo '..:..:..:..:..:..' | sed -e 's/://g')
.. but I'm sure there's a better way. Suggestions?
cat /sys/class/net/eth0/address
Adam
Cool.
I looked around /proc thinking I might find something like that. And of course got nowhere.
That is useful.
Mick
--------------------------------------------------------------------- blog: baldric.net fingerprint: E8D2 8882 F7AE DEB7 B2AA 9407 B9EA 82CC 1092 7423 ---------------------------------------------------------------------