Enjoy Programming With Open Source!! OpenSource Blog - Java,Python,Linux,Cloud Computing..
There is a bit easier variant. longer:openssl rand -hex 6 | sed 's/\(..\)\(..\)\(..\)\(..\)\(..\)\(..\)/\1:\2:\3:\4:\5:\6/'or shorter:openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/:$//'The load consumption of both variants is very similar according to quick measuring with time.
Thanks for the info. :)
There is a bit easier variant.
ReplyDeletelonger:
openssl rand -hex 6 | sed 's/\(..\)\(..\)\(..\)\(..\)\(..\)\(..\)/\1:\2:\3:\4:\5:\6/'
or shorter:
openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/:$//'
The load consumption of both variants is very similar according to quick measuring with time.
Thanks for the info. :)
Delete