Last active
August 29, 2015 14:05
-
-
Save diabloneo/ec1b11d73c7a8e260058 to your computer and use it in GitHub Desktop.
Command line Python to exchange MAC address bytes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
mac="56:66:6c:03:ef:dc" | |
newmac=$(python -c "mac = \"${mac}\"; newmac=mac[0] + mac[16] + mac[2:]; print newmac") | |
echo ${newmac} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think it's more convenient than using shell's array.