Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Script to convert mac address on clipboard between formats
# Grabs MAC addresses in xxxx.xxxx.xxxx form from the clipboard and transforms it to XXXXXXXXXXXX
pbpaste -Prefer txt | perl -pe 's/(\w{4}).(\w{4}).(\w{4})/\U\1\2\3/;' | pbcopy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment