generate uuid bash

$ head /dev/urandom | tr -dc 'a-f0-9' | head -c 32 | sed -e 's/\(.\{8\}\)\(.\{4\}\)\(.\{4\}\)\(.\{4\}\)\(.\{12\}\)/\1-\2-\3-\4-\5/'
1ac5f675-6fd0-959c-4095-d44db2d64a49

silly, but easy.

share:

Leave a Reply

Your email address will not be published. Required fields are marked *