使用sed生成随机的MAC地址
Hujiuxiang
・1 分钟阅读
生成随机MAC地址
openssl rand -hex 6 | sed 's/(..)/1:/g; s/.$//'
对FreeBSD有以下变化:
openssl rand 6 | xxd -p | sed 's/(..)/1:/g; s/:$//'