Last active
June 21, 2019 05:10
-
-
Save weatheredwatcher/0458fb0a53bf9531dd1c031e2c294935 to your computer and use it in GitHub Desktop.
First pass at a Safari style password Generator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/zsh | |
if ((! $+commands[pwgen] )); | |
then | |
echo "fail" | |
fi | |
i=0 | |
while [ $i -lt 4 ] | |
do | |
((i++)) | |
final_pass="$final_pass$(pwgen 8 1)" | |
if [[ $i != 4 ]]; then | |
final_pass="$final_pass-" | |
fi | |
done | |
echo $final_pass | |
echo $final_pass | pbcopy | |
echo "Password copied to clipboard" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a nifty little script that I have been messing around with. It loops through 4 times, generating a Safari style password.
It requires pwgen, ZSH and OS X.