obtaining the MAC of the interfaces
Hi,
I'm running this command, and seems not to work, following the command: Quote:
Quote:
Quote:
Regards! |
Yo!
Quote:
Use Quote:
Wellness Thor |
Looks like, the for loop is not correct. Please use the following one, it will work.
Code:
for nic in `ls /sys/class/net | grep -v lo`; do echo ${nic}; udevinfo -a -p /sys/class/net/${nic}/address | grep -i address | grep -v looking | grep -v KERNEL; done |
Quote:
Quote:
Many thanks for your help Regards! |
Quote:
|
Thanks!
I learned something here :D THor |
You could get the MAC address from the contents of the /sys/class/net/*/address file.
|
All times are GMT -5. The time now is 04:49 AM. |