summaryrefslogtreecommitdiff
path: root/misc/passwdgen
diff options
context:
space:
mode:
Diffstat (limited to 'misc/passwdgen')
-rwxr-xr-xmisc/passwdgen6
1 files changed, 3 insertions, 3 deletions
diff --git a/misc/passwdgen b/misc/passwdgen
index 21dff29..89318d0 100755
--- a/misc/passwdgen
+++ b/misc/passwdgen
@@ -1,7 +1,7 @@
#!/bin/sh
-[ -n "`echo $1$2 | tr -d '[:digit:]'`" ] && echo "Usage: $0 [Length] [Itterations] [Set]" && exit
-[ -z "$1" ] && len=20 || len=$1
-[ -z "$2" ] && itt=5 || itt=$2
+[ -n "`echo $1$2 | tr -d '[:digit:]'`" ] && echo "Usage: $0 [Itterations] [Length] [Set]" && exit
+[ -z "$1" ] && itt=5 || itt=$1
+[ -z "$2" ] && len=20 || len=$2
[ -z "$3" ] && set='[:graph:]' || set=$3
genpasswd() { tr -cd "$3" < /dev/urandom | fold -w$1 | head -n$2; }
genpasswd $len $itt $set