Like with everything, I am sure there are 101 ones to create a GUID value from within a Bash script.  My method is maybe a bit of a  cheat but it is quite and easy and possibly doesn’t have the overhead of calling a perl script which in turn is calling a CPAN module.  Instead, I am using the UUID() function from within mysql!

GUID=`./mysql -u username -B –silent -e ’select uuid()’`

The overhead of calling and connecting to a mysql server is maybe something to think about if it was going to be used over and over.

I wonder, does anyone else know a native way to create a GUID from within a shell script?