Skip to content

Instantly share code, notes, and snippets.

@peterklipfel
Created July 25, 2014 18:55
Show Gist options
  • Save peterklipfel/aeffcfc3f1b9c908ff49 to your computer and use it in GitHub Desktop.
Save peterklipfel/aeffcfc3f1b9c908ff49 to your computer and use it in GitHub Desktop.
Generate passwords from dev/urandom
# Alphanumeric
echo 'alphanumeric'
cat /dev/urandom| tr -dc 'a-zA-Z0-9' | fold -w 20| head -n 1
# special characters
echo 'special characters'
cat /dev/urandom| tr -dc 'a-zA-Z0-9-_!@#$%^&*()_+{}|:<>?='|fold -w 30| head -n 1| grep -i '[!@#$%^&*()_+{}|:<>?=]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment