An alternative using openssl $ printf "%016X\n" $((16#$(openssl rand -hex 8) & 0x7fffffffffffffff)) 4B0193AE43934F09 To get the leading zeros so it will generate an 8-byte serial number, I added: |
An alternative using openssl $ printf "%016X\n" $((16#$(openssl rand -hex 8) & 0x7fffffffffffffff)) 4B0193AE43934F09 To get the leading zeros so it will generate an 8-byte serial number, I added: |