Last active
July 29, 2022 11:11
-
-
Save shaunmolloy/a87301d32dc10d57498b88ac9ded4dd1 to your computer and use it in GitHub Desktop.
short-uuid - generate a short uuid in bash
This file contains hidden or 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
#!/usr/bin/env bash | |
# short-uuid | |
UUID=$(cat /proc/sys/kernel/random/uuid) | |
SHORT_UUID=$(echo $UUID | sed "s/-//g") | |
SHORT_UUID=${SHORT_UUID:0:10} | |
echo $SHORT_UUID |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment