Skip to content

Instantly share code, notes, and snippets.

@cyberhobo
Created April 6, 2012 20:50
Show Gist options
  • Save cyberhobo/2322837 to your computer and use it in GitHub Desktop.
Save cyberhobo/2322837 to your computer and use it in GitHub Desktop.
bash script to generate a random password
#!/bin/bash
LEN=${1-12}
head /dev/urandom | uuencode -m - | sed -n 2p | cut -c1-${1:-$LEN};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment