Skip to content

Instantly share code, notes, and snippets.

@shaunmolloy
Last active July 29, 2022 11:11
Show Gist options
  • Save shaunmolloy/a87301d32dc10d57498b88ac9ded4dd1 to your computer and use it in GitHub Desktop.
Save shaunmolloy/a87301d32dc10d57498b88ac9ded4dd1 to your computer and use it in GitHub Desktop.
short-uuid - generate a short uuid in bash
#!/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