luckfox-pico-sdk/sysdrv/drv_ko/wifi/ssv6x5x/script/get_mac
2023-08-08 20:36:47 +08:00

11 lines
171 B
Bash

#!/bin/sh
if [ $# != 1 ]; then
interface=eth0
else
interface=$1
fi
mac=`ifconfig $interface | grep HWaddr | sed -e 's/.*HWaddr //g' | sed -e 's/ //g'`
echo $mac