genpass
This commit is contained in:
parent
3f55407ac9
commit
b997c20887
@ -85,3 +85,13 @@ extract() {
|
|||||||
echo "'$1' is not a valid file!"
|
echo "'$1' is not a valid file!"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Generate a password
|
||||||
|
genpass() {
|
||||||
|
if [ $# != 1 ]; then
|
||||||
|
echo "Usage: genpass <len>"
|
||||||
|
else
|
||||||
|
echo $(openssl rand -base64 $1 | tr -d "\n")
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user