5 # Distributed under terms of the GPLv3 license.
9 echo "genpasswd.sh: A Password Generator\n
10 Usage: genpasswd.sh [length] [count]\n
16 [[ "$1" -gt 0 ]] && _length
=$1 || _help
17 [[ "$2" -gt 0 ]] && _count
=$2 || _count
="1"
20 local _strings
="[:alnum:]!@#$%^&*(){}"
21 LC_ALL
=C
tr -dc $_strings < /dev
/urandom |
head -c $_length |
xargs
24 for ((counts
= 1; counts
<= "$_count"; counts
++))