2013-10-08

Lowercase UUIDs

The UUID spec requires that hex strings be generated in lowercase, while tolerating uppercase for input.

6.5.4 Software generating the hexadecimal representation of a UUID shall not use upper case letters. NOTE – It is recommended that the hexadecimal representation used in all human-readable formats be restricted to lower-case letters. Software processing this representation is, however, required to accept both upper and lower case letters as specified in 6.5.2.
 Unfortunately, the 'uuidgen' command in Mac OS X is out of compliance with the spec, outputting uppercase. Example:

…$ uuidgen
54B09346-2176-4EF5-AB36-5E8A70D0BC9F


Also, Microsoft utilities in the past have output mixed case, oddly enough (a programing boo-boo according to legend).

This blog post  shares a line of bash code to convert the Mac's hex string to lowercase.
uuidgen | tr [:upper:] [:lower:]

Example:
$ uuidgen | tr [:upper:] [:lower:]
a03959cb-cf12-4de5-89d2-3a3be7963e1c


8 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. Most of the people do all their work in the English language as it has become no less than a universal language that everyone could understand. There are various things that one should judge while reading a report or a write-up in English so that he can assess if there is the correct use of it or not. visit the website

    ReplyDelete
  3. There is a book between teacher and student. Both teacher and student work with the help of book. We work on writing and there is strong relation of writing between us and you. click here

    ReplyDelete
  4. This is nice information regarding software. We must learn about different software so click here.

    ReplyDelete
  5. Medical education has exaggerated the generation of anyone. this permits to understand the reason for the sickness and read here then helps within the hindrance of that specific sickness.

    ReplyDelete
  6. Many universities in Asian and African countries still don’t develop any policies to get plagiarism free assignments from students with no compromise on the quality of work.
    this website

    ReplyDelete
  7. Education is that factor that creates folks ready to perceive the proper and wrong things. Educated or literate folks higher recognize what would be right for them and what would be not right. edit my sentence

    ReplyDelete
  8. Hi,
    This is really a nice blog by you. I really appreciate your efforts for this blog. Keep it up and keep posting such blogs.
    There is one language which is most commonly used and that everyone knows after their mother tongue is English. English is one of the most spoken languages in the world. But it is seen that most of the people hesitate to speak English fluently as they didn’t get the necessary environment to learn english. This is because most of the people take online spoken english classes to learn to speak English.
    What is a chemical reaction?

    ReplyDelete