Skip to content

Instantly share code, notes, and snippets.

@djanowski
Created September 2, 2014 14:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save djanowski/8cdc53d5d4ea0d28b60b to your computer and use it in GitHub Desktop.
Save djanowski/8cdc53d5d4ea0d28b60b to your computer and use it in GitHub Desktop.
#! /bin/bash
# Creates passwords of the given length, all lower case for easier input on mobile devices.
length="${1:-24}"
password=$(openssl rand -base64 $(($length + 50)) | tr -Cd '[:lower:]' | cut -c 1-$(($length)))
echo "$password" | pbcopy
echo "$password"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment