Skip to content

Instantly share code, notes, and snippets.

@cgansen
Created January 31, 2017 23:31
Show Gist options
  • Select an option

  • Save cgansen/8116e787f201526f6b76dfd197bcb2a7 to your computer and use it in GitHub Desktop.

Select an option

Save cgansen/8116e787f201526f6b76dfd197bcb2a7 to your computer and use it in GitHub Desktop.
randstring - generate a random string of alphanumeric characters from /dev/urandom
#!/bin/bash
cat /dev/urandom | env LC_CTYPE=C tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment