generate_random_code.sh
#!/bin/bash
openssl rand -hex 3
验证:
[root@logstash ~]# sh generate_random_code.sh
756931
[root@logstash ~]# sh generate_random_code.sh
3f6cff
[root@logstash ~]# sh generate_random_code.sh
4e4ed7
[root@logstash ~]#
generate_random_code.sh
#!/bin/bash
openssl rand -hex 3
验证:
[root@logstash ~]# sh generate_random_code.sh
756931
[root@logstash ~]# sh generate_random_code.sh
3f6cff
[root@logstash ~]# sh generate_random_code.sh
4e4ed7
[root@logstash ~]#