Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: MAC Address of An Interface

by hsinclai (Deacon)
on Sep 08, 2004 at 03:00 UTC ( #389267=note: print w/replies, xml ) Need Help??


in reply to MAC Address of An Interface

Did you say Linux?

Maybe parse it out of the ifconfig output itself?

perl -e '$if=eth0; $mac=(split(/\s+/,qx!/sbin/ifconfig $if!))[4]; prin +t $mac;'


On BSD you'd pull out the "ether" line of ifconfig..

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://389267]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (10)
As of 2021-01-26 12:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?