Updated README with new args.

This commit is contained in:
tapesonthefloor 2015-04-13 22:37:37 -04:00
parent 2d1b4b4b24
commit cab2e3d306
2 changed files with 11 additions and 5 deletions

View File

@ -1,10 +1,16 @@
# passphrase # passphrase
A simple bash script that generates random dictionary-derived passwords for me. It takes a single parameter, which is the number of phrase groups to output. A simple bash script that generates random dictionary-derived passwords for me. It takes two arguments:
**-c** <*number*>
Provides this many groups of five passphrases.
**-s**
Include spaces between all words.
Here's an example. Feel free to mix and match and use these as passwords. They would be good passwords. I'm not using any of them. I swear. Here's an example. Feel free to mix and match and use these as passwords. They would be good passwords. I'm not using any of them. I swear.
``` ```shell
$ passphrase 5 $ passphrase -c 5 -s
tree eardrum format tree eardrum format
yachts guerilla sheepdog yachts guerilla sheepdog

View File

@ -15,13 +15,13 @@ while [[ $# > 0 ]]; do # iterate through arguments, one or two steps at a time
key="$1" # argument key key="$1" # argument key
case $key in case $key in
-s|--space) # we want spaces b/w words -s) # we want spaces b/w words
SPACE=1 SPACE=1
# since this option takes no value argument, we only want # since this option takes no value argument, we only want
# to shift ahead one argument # to shift ahead one argument
;; ;;
-c|--count) # we want a certain number of groups -c) # we want a certain number of groups
COUNT="$2" COUNT="$2"
# and since this does have a value, skip the value itself on # and since this does have a value, skip the value itself on
# the next scan... we know it's not an argument key # the next scan... we know it's not an argument key