Skip to content

Instantly share code, notes, and snippets.

@HRezaei
Created March 25, 2017 11:28
Show Gist options
  • Save HRezaei/d2f0b3ea468d5617ad506ea939f14aa5 to your computer and use it in GitHub Desktop.
Save HRezaei/d2f0b3ea468d5617ad506ea939f14aa5 to your computer and use it in GitHub Desktop.
Generate random bit strings in bash
cat /dev/urandom | tr -dc 'A-F0-9' | fold -w 16 | head -n 5 | sed -e "s/^/('/" | sed -e "s/$/'),/g" > /tmp/codes.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment