Last active
December 13, 2021 15:09
-
-
Save bacongravy/d9f22aa4f49e6c3a5714fb3a6becec7b to your computer and use it in GitHub Desktop.
pwcopy.zsh
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 pwcopy { | |
< /dev/urandom \ | |
LANG= \ | |
tr -dc a-zA-Z0-9 \ | |
| head -c ${1:-16} \ | |
| pbcopy \ | |
&& pbpaste \ | |
&& echo | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment