Skip to content

Instantly share code, notes, and snippets.

@SolemnJoker
Last active November 7, 2020 06:48
Show Gist options
  • Save SolemnJoker/62817dbe65befe3612519395f2559c86 to your computer and use it in GitHub Desktop.
Save SolemnJoker/62817dbe65befe3612519395f2559c86 to your computer and use it in GitHub Desktop.
[shell 记录 ] #bash #shell
mac_addr=`ifconfig |grep ether |head -n 1 | grep -o "[a-f0-9A-F]\\([a-f0-9A-F]\\:[a-f0-9A-F]\\)\\{5\\}[a-f0-9A-F]"`
$MAC_ADDR=$mac_addr|sed -e 's/[\:]//g' |tr '[a-z]' '[A-Z]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment