aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/bin/makepass8
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/bin/makepass b/bin/bin/makepass
index 25fce07..0ebc60b 100755
--- a/bin/bin/makepass
+++ b/bin/bin/makepass
@@ -29,16 +29,16 @@ function makepass {
echo "Normal passwords:"
for i in {1..10}; do
[ "$1" = "" ] && l=$(shuf -i 8-44 -n 1)
- < /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-$l};echo;
+ head -n10 /dev/urandom | tr -dc _A-Z-a-z-0-9 | cut -c-${1:-$l};
done | column
echo ""
echo "Passwords with special characters:"
for i in {1..6}; do
[ "$1" = "" ] && l=$(shuf -i 16-64 -n 1)
- first=$(< /dev/urandom tr -dc A-Za-z | head -c 1)
- words=$(< /dev/urandom tr -dc '!#$%&/()=?+-_,.;:<>[]{}|\@*^A-Z-a-z-0-9' | head -c${1:-$l} | cut -c 3-)
- last=$(< /dev/urandom tr -dc A-Za-z | head -c 1)
+ first=$(head -n10 /dev/urandom | tr -dc A-Za-z | cut -c-1)
+ words=$(head -n10 /dev/urandom | tr -dc '!#$%&/()=?+-_,.;:<>[]{}|\@*^A-Z-a-z-0-9' | cut -c-${1:-$l})
+ last=$(head -n10 /dev/urandom | tr -dc A-Za-z | cut -c-1)
echo "${first}${words}${last}"
done | column