PURPOSE

uuidgen - generate a Universal Unique Identifier (UUID)

SYNOPSIS

uuidgen [-i] [-o filename] [{-i | -n number}] [-v] [-h] [-?]

DESCRIPTION

uuidgen, by default, generates a Universal Unique Identifier (UUID) on the standard output. The UUID is used to uniquely identifier an IDL interface definition. The format for a UUID string consists of eight hexadecimal digits followed by a dash, followed by three groups of four hexadecimal digits separated by dashes, followed by a dash and twelve hexadecimal digits (see the EXAMPLES below).

The following options are supported:

-i
Produces an IDL file template, including a UUID string (see EXAMPLES for the file format). This option cannot be specified with the -n option.
-n number
Generates the specified number of UUID strings. This option cannot be specified with the -i option.
-o filename
 
-v
Displays the version number for uuidgen(1) but does not generate a UUID string.
 
-h or -?
Displays help information for uuidgen(1).

NETWORK ADDRESS

The generation of the UUID requires the availability of a 48-bit IEEE 802 address. Since this is not available in all environments and the method of determination is not portable, several methods are available for use with the System/T version of uuidgen.

-
If the NADDR environment variable is set to a value of the form num.num.num.num it is taken to be a Internet-style address and converted.
-
Otherwise, if the WSNADDR environment variable is set to a value of the form 0xnnnnnnnnnnnnnnnn it is taken to be a hexadecimal network address, as used in /WS.
-
Otherwise, if not DOS, the uname for the machine is used to look up the machine ENTRY in /etc/hosts to get the Internet-style address.
-
Otherwise, a warning is printed and 00.00.00.00 is used.

Note that in each of these cases, a 32-bit address is formed and the remainder of the address (for 48-bits) is treated as 00.00.

DIAGNOSTICS

uuidgen will exit with a non-zero exit code if an invalid command line option is specified, or if it cannot open the output file. A warning is printed if an invalid network address value is given and the value 00.00.00.00 is used.

EXAMPLES

Generate a UUID string:

uuidgen
23C67E00-71B6-11C9-9DFC-08002B0ECEF1
Generate an IDL template for developing an interface definition: 
uuidgen -i
[uuid(B5F8DB80-3CCA-14F8-1E78-930269370000)]
interface INTERFACE
{
}
Generate two UUID strings: 
uuidgen -n 2
C0B37080-3CCA-14F8-265F-930269370000
C0B37081-3CCA-14F8-2CDB-930269370000

SEE ALSO


tidl(1)