Add simple password generator

pull/76/merge
Mark Szymanski 2011-08-10 18:49:20 -05:00
parent e964c029aa
commit 576434048b
1 changed files with 12 additions and 0 deletions

View File

@ -15,6 +15,18 @@ function myip {
echo "Your public IP is: ${bold_green} $res ${normal}" echo "Your public IP is: ${bold_green} $res ${normal}"
} }
pass() {
if [ -z "$(which gshuf)" ]
then
echo "Error: shuf isn't installed!"
return 1
fi
pass=$(shuf -n4 /usr/share/dict/words | tr '\n' ' ')
echo "With spaces (easier to memorize): $pass"
echo "Without (use this as the pass): $(echo $pass | tr -d ' ')"
}
# Function for previewing markdown files in the browser # Function for previewing markdown files in the browser
function pmdown() { function pmdown() {