From 5082c3f7d822e6634dbbdb51ae7e644f687ab592 Mon Sep 17 00:00:00 2001 From: NunoSempere Date: Sun, 2 Nov 2025 23:36:40 -0300 Subject: [PATCH] add number and symbols --- append.bash | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/append.bash b/append.bash index dcae8c2..b47409f 100644 --- a/append.bash +++ b/append.bash @@ -73,7 +73,10 @@ cmd_append_append() { # read -r -n $length new_password < <(LC_ALL=C tr -dc "$characters" < /dev/urandom) # new method: - new_password=$(cat /usr/share/dict/words | sed "s|'s||g" | shuf -n6 | sed -z 's/\n/-/g;s/-$/\n/' | tr '[:upper:]' '[:lower:]') + new_password_words=$(cat /usr/share/dict/words | sed "s|'s||g" | shuf -n4 | sed -z 's/\n/-/g;s/-$/\n/' | tr '[:upper:]' '[:lower:]') + new_password_num=$(shuf -i 1-100 -n 1) + new_password_symbol=$(echo '!@#$%*()' | fold -w1 | shuf -n1) + new_password=$new_password_words$new_password_symbol$new_password_num printf "$new_password" | xclip -sel clip echo "Copied new password to clipboard: " echo "$new_password"