Last active
October 8, 2015 08:38
-
-
Save putnamhill/3306853 to your computer and use it in GitHub Desktop.
A bash version of the genUID.app CLSID generator for Adobe Director MOA classes.
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 | |
# genUID.sh - A bash version of the genUID.app CLSID generator for Adobe Director MOA classes. | |
openssl rand -hex 16 | awk '{ | |
printf "DEFINE_GUID(CLSID(CRegister), 0x%sL, 0x%s, 0x%s, 0x%s, 0x%s, 0x%s, 0x%s, 0x%s, 0x%s, 0x%s, 0x%s);\n", | |
substr($0, 1, 8), substr($0, 9, 4), substr($0, 13, 4), substr($0, 17, 2), | |
substr($0, 19, 2), substr($0, 21, 2), substr($0, 23, 2), substr($0, 25, 2), | |
substr($0, 27, 2), substr($0, 29, 2), substr($0, 31, 2) | |
}' | \ | |
# 1st print to console... | |
tee -a /dev/tty | \ | |
# ...then put a copy on the clipboard | |
pbcopy | |
echo '(a copy of this CLSID is on the clipboard)' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment