diff options
-rwxr-xr-x | mkpass | 7 | ||||
-rw-r--r-- | mkpass.1 | 3 |
2 files changed, 3 insertions, 7 deletions
@@ -3,14 +3,13 @@ set -e usage() { - echo "Usage: ${0##*/} [-n] [-l length] [chars]" >&2 + echo "Usage: ${0##*/} [-l length] [chars]" >&2 exit 1 } -while getopts 'l:n' o; do +while getopts 'l:' o; do case "$o" in l) len="$OPTARG" ;; - n) nnl=false ;; *) usage ;; esac done @@ -18,4 +17,4 @@ done shift $((OPTIND - 1)) [ $# -gt 1 ] && usage </dev/urandom tr -dc -- "${1:-[:graph:]}" | head -c "${len:-64}" -${nnl:-true} && echo +echo @@ -6,7 +6,6 @@ .Nd make a password .Sh SYNOPSIS .Nm -.Op Fl n .Op Fl l Ar length .Op Ar chars .Sh DESCRIPTION @@ -27,8 +26,6 @@ section. .Pp The options are as follows: .Bl -tag width Ds -.It Fl n -Do not print a trailing newline after the generated password. .It Fl l Ar length Generate a password .Ar length |