Skip to content

Instantly share code, notes, and snippets.

@neofob
Created August 15, 2019 06:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neofob/06a4656065b6f08611dd17c7e1348210 to your computer and use it in GitHub Desktop.
Save neofob/06a4656065b6f08611dd17c7e1348210 to your computer and use it in GitHub Desktop.
Random password in a random length
#!/usr/bin/env bash
# Generate a random password, save it to a file, copy it via xclip
# Usage: genpass.sh saved_passwd.txt
openssl rand -base64 $(echo $RANDOM%8+24 | bc) | tee > $1 | xclip -selection c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment