Skip to content

Instantly share code, notes, and snippets.

@katyukha
Created June 4, 2015 11:36
Show Gist options
  • Save katyukha/3cf86f15c4338bd6502e to your computer and use it in GitHub Desktop.
Save katyukha/3cf86f15c4338bd6502e to your computer and use it in GitHub Desktop.
Random password generator
randpw(){ < /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-16};echo;}
# usage:
# randpw [length]
# randpw - generate password with 16 characters
# randpw 8 - generate password with 8 characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment