Created
May 2, 2016 06:09
-
-
Save kevinadi/9ad966e6574e111f9b3ebd3e04b5e93b to your computer and use it in GitHub Desktop.
Fish shell: create 5 random passwords
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
function random_pwd | |
for i in (seq 5) | |
cat /dev/urandom | env LC_CTYPE=C tr -dc 'a-zA-Z0-9' | fold -w 18 | head -n 1 | tr -d '\n' | fold -w 3 | tr '\n' '-' | |
echo '' | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment