Skip to content

Instantly share code, notes, and snippets.

@Ricky-Wilson
Created March 20, 2020 07:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ricky-Wilson/c7961a2b0099d0d6c05c4dc7073fd5bf to your computer and use it in GitHub Desktop.
Save Ricky-Wilson/c7961a2b0099d0d6c05c4dc7073fd5bf to your computer and use it in GitHub Desktop.
Generate a random MAC address
#!/bin/bash
MAC=`(date; cat /proc/interrupts) | \
md5sum | sed -r 's/^(.{10}).*$/\1/; s/([0-9a-f]{2})/\1:/g; s/:$//;'`
echo "$MAC"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment