Skip to content

Instantly share code, notes, and snippets.

@MurphysChaos
Created December 11, 2018 17:32
Show Gist options
  • Save MurphysChaos/53c85cf488b80c1490b5c3ad084e9a18 to your computer and use it in GitHub Desktop.
Save MurphysChaos/53c85cf488b80c1490b5c3ad084e9a18 to your computer and use it in GitHub Desktop.
Generate an ID used by Xcode Interface Builder
#!/usr/bin/env bash
R=$(cat /dev/urandom | gtr -dc 'a-zA-Z0-9' | gfold -w 8 | ghead -n 1)
echo $R | gsed -E 's/(.{3})(.{2})(.{3})/\1-\2-\3/'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment