linux取随机数shell版本
1 #!/bin/bash 2 aa=$(date +%N|md5sum|cut -c 3-10) 3 4 for i in stuu{1..3} 5 do 6 useradd $i 7 echo $aa|passwd --stdin $i 8 echo "${i} ${aa}" >>$(date +%F%M%S).log 9 done
时来天地皆同力,运去英雄不自由
1 #!/bin/bash 2 aa=$(date +%N|md5sum|cut -c 3-10) 3 4 for i in stuu{1..3} 5 do 6 useradd $i 7 echo $aa|passwd --stdin $i 8 echo "${i} ${aa}" >>$(date +%F%M%S).log 9 done