文章分类 -  shell

摘要:1 [root@CHN-BJ-01-DR720-VPN script]# cat account_auto.sh 2 #!/bin/bash 3 #Date:2013-08-29 4 #Author:ZhangLuYa 5 #Version 1.5 6 7 Port="51022" 8 Work="/work/script" 9 ip_list="${Work}/test.txt" 10 Password=$(cat /dev/urandom|head -1|md5sum|head -c 10) 11 12 Public(){ 13 阅读全文
posted @ 2013-09-23 12:10 study-notes 编辑
摘要:这个在写自动化脚本的过程中应用比较多:第一种方法:[root@sa script]# cat /dev/urandom|head -1|md5sum|head -c 10723b94a449[root@sa script]# cat /dev/urandom|head -1|md5sum|head -c 10271a3e6c3e第二种方法:[root@sa script]# od -N 4 -t x4 /dev/random | head -1 | awk '{print $2}'1627e832[root@sa script]# od -N 4 -t x4 /dev/rand 阅读全文
posted @ 2013-09-09 10:30 study-notes 编辑

点击右上角即可分享
微信分享提示