add number and symbols
This commit is contained in:
parent
dd3297e81a
commit
5082c3f7d8
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user