Skip to content

Instantly share code, notes, and snippets.

@brwyatt
Created April 29, 2014 19:28
Show Gist options
  • Save brwyatt/887e8b072da4306367d3 to your computer and use it in GitHub Desktop.
Save brwyatt/887e8b072da4306367d3 to your computer and use it in GitHub Desktop.
Generate a 15-25 character password with lower/upper-case, numbers, -, and _
#!/bin/bash
cat /dev/urandom|tr -dc 'a-zA-Z0-9_-'|fold -w$(echo "($RANDOM%10)+15"|bc)|head -n1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment