linux命令行下生成随机密码

</dev/urandom tr -dc '!@#$%_A-Z-a-z-0-9' | head -c32; echo ""
expr substr $(cat /proc/sys/kernel/random/uuid) 1 8

参考:

linux命令行下生成随机密码

http://blog.netoearth.com/html/201009/linux%E5%91%BD%E4%BB%A4%E8%A1%8C%E4%B8%8B%E7%94%9F%E6%88%90%E9%9A%8F%E6%9C%BA%E5%AF%86%E7%A0%81.htm

linux shell实现随机数多种方法: http://www.cnblogs.com/chengmo/archive/2010/10/23/1858879.html;

bash shell字符串操作: http://www.jb51.net/article/50435.htm;

猜你喜欢

转载自oitebody.iteye.com/blog/2244959
今日推荐