In Java i can create a new random UUID with
UUID uuid = UUID.randomUUID();
I now need to do the same within a bash script. Is there a command or library I could use?
|
|
|
See the |
|||||
|
|
Just for the sake of completeness... There's also a UUID generator installed with the
Grawity adds a safety tip: "DBus UUIDs are not related to or compatible with RFC 4122. Besides, dbus-uuidgen always uses the Unix timestamp as the last 4 bytes. So they might be unsuitable for some uses." (Thanks, Grawity, I should've spotted that in the manpage.) |
|||||
|
|
Just so python doesn't feel left out:
Son in the shell:
See the Python Documentation for the kinds of UUIDS that can be generated. |
|||
|
|
|
Perl provides a UUID library based on the
This would be trivial to add to a shellscript with backticks or
|
|||
|
|