diff options
author | EuAndreh <eu@euandre.org> | 2022-08-13 11:54:50 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2022-08-13 11:54:50 -0300 |
commit | 1f1f6a13224a988d02cf862bd1bf02c137837271 (patch) | |
tree | 204d8525214fe9b00bd3cd603b9e2d493af9e6b9 /bin | |
parent | bin/: Replace usage of assert_arg with assert-arg (diff) | |
download | dotfiles-1f1f6a13224a988d02cf862bd1bf02c137837271.tar.gz dotfiles-1f1f6a13224a988d02cf862bd1bf02c137837271.tar.xz |
bin/password: Delete in favor of gen-password
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/gen-password | 2 | ||||
-rwxr-xr-x | bin/password | 57 |
2 files changed, 1 insertions, 58 deletions
diff --git a/bin/gen-password b/bin/gen-password index b59213c..327858f 100755 --- a/bin/gen-password +++ b/bin/gen-password @@ -16,7 +16,7 @@ help() { -h, --help show this message LENGTH the length of the generated password - (default: 999) + (default: 999) Generate a random password, and emit it to STDOUT. diff --git a/bin/password b/bin/password deleted file mode 100755 index 718ba1c..0000000 --- a/bin/password +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -set -eu - -usage() { - cat <<-'EOF' - Usage: - password [LENGTH] - password -h - EOF -} - -help() { - cat <<-'EOF' - - Options: - -h, --help show this message - - LENGTH the size of the password (default: 99) - EOF -} - -for flag in "$@"; do - case "$flag" in - --) - break - ;; - --help) - usage - help - exit - ;; - *) - ;; - esac -done - -while getopts 'h' flag; do - case "$flag" in - h) - usage - help - exit - ;; - *) - usage >&2 - exit 2 - ;; - esac -done -shift $((OPTIND - 1)) - - -LENGTH="${1-99}" -tr -cd '[:alnum:]' < /dev/random | - fold -w "$LENGTH" | - head -n1 | - tr -d '\n' |