Skip to content

Instantly share code, notes, and snippets.

@stollcri
Created August 2, 2016 12:15
Show Gist options
  • Select an option

  • Save stollcri/0b7ee7021fb7eb02f8a0dfac1cd23729 to your computer and use it in GitHub Desktop.

Select an option

Save stollcri/0b7ee7021fb7eb02f8a0dfac1cd23729 to your computer and use it in GitHub Desktop.
Shell script to generate a random 32 character alphanumeric string
#!/bin/sh
USER_PASSWORD=$(cat /dev/urandom | env LC_CTYPE=C tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
echo $USER_PASSWORD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment