生成32位随机密码,只包含字母和数字:
echo `openssl rand -base64 50 | tr -dc A-Z-a-z-0-9 | head -c${1:-34}`
openssl使用
原文:https://www.cnblogs.com/igoodful/p/13527882.html