获取随机字符串和数字
获取随机8位字符串
[root@docker ~]# echo $RANDOM | md5sum |cut -c 1-8
15ea2e0d
[root@docker ~]# echo $RANDOM | md5sum |cut -c 1-8
65e1a914
[root@docker ~]# openssl rand -base64 4
zUU1qg==
[root@docker ~]# cat /proc/sys/kernel/random/uuid |cut -c 1-8
37bfef3a
获取随机8位数字
[root@docker ~]# echo $RANDOM | cksum |cut -c 1-8
25780559
[root@docker ~]# openssl rand -base64 4 |cksum |cut -c 1-8
23772422
[root@docker ~]# date +%N | cut -c 1-8
51579216