Created
June 3, 2017 07:25
-
-
Save akash0x53/b07fced1e5164cea9fdcb75e0d17d31b to your computer and use it in GitHub Desktop.
Generate random password and copy to clipboard
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
genpass() | |
{ | |
LEN=$1 | |
shift | |
if [ "$LEN" == "" ];then | |
LEN=8 | |
fi | |
head -c200 /dev/urandom |tr -cd [:alnum:]+[\!\@\#\$]|head -c $LEN|xclip -selection c | |
echo "Copied to clipboard" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment