diff options
Diffstat (limited to 'doc')
48 files changed, 511 insertions, 25 deletions
diff --git a/doc/uuid.de.0.adoc b/doc/uuid.de.0.adoc new file mode 100644 index 0000000..1670ad5 --- /dev/null +++ b/doc/uuid.de.0.adoc @@ -0,0 +1,13 @@ += uuid(0) + + + +== NAME + +uuid - generate or parse UUID values. + + + +== DESCRIPTION + +*uuid* generates UUID of version 4 or version 7, or validate a given UUID. diff --git a/doc/uuid.de.1.adoc b/doc/uuid.de.1.adoc index a0d507b..e64c665 100644 --- a/doc/uuid.de.1.adoc +++ b/doc/uuid.de.1.adoc @@ -4,29 +4,40 @@ == NAME -uuid - generate or validate a UUIDv4 +uuid - generate a UUID version 4 or 7, or validate a UUID string. == SYNOPSYS -*uuid* [_STRING_] +*uuid* [-v (4|7)] *uuid* [_STRING_] == EXAMPLES -=== Print a UUID on the terminal +=== Print a (version 4) UUID on the terminal +[source, sh] .... $ uuid d3891787-c952-af17-d697-0df3b85981e1 .... +=== Print a verson 7 UUID on the terminal + +[source, sh] +.... +$ uuid -v 7 +d3891787-c952-af17-d697-0df3b85981e1 +.... + + === Create a new UUID as part of a path +[source, sh] .... dir="$PWD"/"$(uuid)"/data .... @@ -34,6 +45,7 @@ dir="$PWD"/"$(uuid)"/data === Validate a given UUID +[source, sh] .... ID="$(basename -- "$directory")" if ! uuid "$ID"; then @@ -48,6 +60,14 @@ fi The *uuid* utility generates a new UUID when no _STRING_ is given and write it to _stdout_. If a _STRING_ is given, *uuid* validates it and exits, and produces no output. +The *-v* option allows for choosing which type of UUID to be emitted, either version 4 ("the random one") or version 7 ("the sortable one"). When omitted, version 4 is chosen as default. + + + +== OPTIONS + +*-v NUMBER*:: Choose the UUID version *NUMBER* to be generated. Supported values are 4 (the default) and 7. + == OPERANDS @@ -71,12 +91,14 @@ Not used. The UUIDv4 format is made of byte blocks encoded as hexadecimals, using a <hyphen-minus>('`-`') as the block separator: +[source, sh] .... XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX .... An example output is: +[source, sh] .... cb46d0c0-b2aa-4a6c-a119-8deace2544a2 .... @@ -84,7 +106,15 @@ cb46d0c0-b2aa-4a6c-a119-8deace2544a2 === STDERR -Not used. +Errors on UUID validation are sent to the standard error. For instance: + +[source, sh] +.... +$ uuid not-a-uuid-123 1>/dev/null +uuid: str isn't of the correct length +.... + +When valid, validation emits nothing and exits with 0. === INPUT FILES @@ -107,7 +137,7 @@ None. == CONFORMING TO -The v4 UUID defined in *RFC 9562*. +The versions 4 and 7 of the UUID defined in *RFC 9562*. diff --git a/doc/uuid.de.3.adoc b/doc/uuid.de.3.adoc new file mode 100644 index 0000000..24fcde5 --- /dev/null +++ b/doc/uuid.de.3.adoc @@ -0,0 +1,5 @@ += uuid(3) + +== NAME + +uuid - . diff --git a/doc/uuid.de.7CHANGELOG.adoc b/doc/uuid.de.7CHANGELOG.adoc new file mode 100644 index 0000000..e1b6975 --- /dev/null +++ b/doc/uuid.de.7CHANGELOG.adoc @@ -0,0 +1,22 @@ += uuid(7CHANGELOG) + +== NAME + +uuid - . + +== DESCRIPTION + +//// +Entry template: +== Unreleased +=== Added +=== Changed +=== Deprecated +=== Removed +=== Fixed +=== Security +//// + +Changelog for https://euandre.org/s/uuid/en/[uuid]. + +== Unreleased diff --git a/doc/uuid.de.7README.adoc b/doc/uuid.de.7README.adoc new file mode 100644 index 0000000..3def718 --- /dev/null +++ b/doc/uuid.de.7README.adoc @@ -0,0 +1,5 @@ += uuid(7README) + +== NAME + +uuid - . diff --git a/doc/uuid.de.7recipes.adoc b/doc/uuid.de.7recipes.adoc new file mode 100644 index 0000000..2f20a16 --- /dev/null +++ b/doc/uuid.de.7recipes.adoc @@ -0,0 +1,5 @@ += uuid(7recipes) + +== NAME + +uuid - . diff --git a/doc/uuid.de.7tutorial.adoc b/doc/uuid.de.7tutorial.adoc new file mode 100644 index 0000000..1a77799 --- /dev/null +++ b/doc/uuid.de.7tutorial.adoc @@ -0,0 +1,5 @@ += uuid(7tutorial) + +== NAME + +uuid - . diff --git a/doc/uuid.de.7why.adoc b/doc/uuid.de.7why.adoc new file mode 100644 index 0000000..51096c1 --- /dev/null +++ b/doc/uuid.de.7why.adoc @@ -0,0 +1,5 @@ += uuid(7why) + +== NAME + +uuid - . diff --git a/doc/uuid.en.0.adoc b/doc/uuid.en.0.adoc new file mode 100644 index 0000000..1670ad5 --- /dev/null +++ b/doc/uuid.en.0.adoc @@ -0,0 +1,13 @@ += uuid(0) + + + +== NAME + +uuid - generate or parse UUID values. + + + +== DESCRIPTION + +*uuid* generates UUID of version 4 or version 7, or validate a given UUID. diff --git a/doc/uuid.en.3.adoc b/doc/uuid.en.3.adoc new file mode 100644 index 0000000..24fcde5 --- /dev/null +++ b/doc/uuid.en.3.adoc @@ -0,0 +1,5 @@ += uuid(3) + +== NAME + +uuid - . diff --git a/doc/uuid.en.7CHANGELOG.adoc b/doc/uuid.en.7CHANGELOG.adoc new file mode 120000 index 0000000..e59a806 --- /dev/null +++ b/doc/uuid.en.7CHANGELOG.adoc @@ -0,0 +1 @@ +../CHANGELOG.adoc
\ No newline at end of file diff --git a/doc/uuid.en.7README.adoc b/doc/uuid.en.7README.adoc new file mode 120000 index 0000000..a7ab0b1 --- /dev/null +++ b/doc/uuid.en.7README.adoc @@ -0,0 +1 @@ +../README.adoc
\ No newline at end of file diff --git a/doc/uuid.en.7TODOs.adoc b/doc/uuid.en.7TODOs.adoc new file mode 120000 index 0000000..b499888 --- /dev/null +++ b/doc/uuid.en.7TODOs.adoc @@ -0,0 +1 @@ +../TODOs.adoc
\ No newline at end of file diff --git a/doc/uuid.en.7recipes.adoc b/doc/uuid.en.7recipes.adoc new file mode 100644 index 0000000..2f20a16 --- /dev/null +++ b/doc/uuid.en.7recipes.adoc @@ -0,0 +1,5 @@ += uuid(7recipes) + +== NAME + +uuid - . diff --git a/doc/uuid.en.7tutorial.adoc b/doc/uuid.en.7tutorial.adoc new file mode 100644 index 0000000..1a77799 --- /dev/null +++ b/doc/uuid.en.7tutorial.adoc @@ -0,0 +1,5 @@ += uuid(7tutorial) + +== NAME + +uuid - . diff --git a/doc/uuid.en.7why.adoc b/doc/uuid.en.7why.adoc new file mode 100644 index 0000000..51096c1 --- /dev/null +++ b/doc/uuid.en.7why.adoc @@ -0,0 +1,5 @@ += uuid(7why) + +== NAME + +uuid - . diff --git a/doc/uuid.eo.0.adoc b/doc/uuid.eo.0.adoc new file mode 100644 index 0000000..1670ad5 --- /dev/null +++ b/doc/uuid.eo.0.adoc @@ -0,0 +1,13 @@ += uuid(0) + + + +== NAME + +uuid - generate or parse UUID values. + + + +== DESCRIPTION + +*uuid* generates UUID of version 4 or version 7, or validate a given UUID. diff --git a/doc/uuid.eo.1.adoc b/doc/uuid.eo.1.adoc index a0d507b..e64c665 100644 --- a/doc/uuid.eo.1.adoc +++ b/doc/uuid.eo.1.adoc @@ -4,29 +4,40 @@ == NAME -uuid - generate or validate a UUIDv4 +uuid - generate a UUID version 4 or 7, or validate a UUID string. == SYNOPSYS -*uuid* [_STRING_] +*uuid* [-v (4|7)] *uuid* [_STRING_] == EXAMPLES -=== Print a UUID on the terminal +=== Print a (version 4) UUID on the terminal +[source, sh] .... $ uuid d3891787-c952-af17-d697-0df3b85981e1 .... +=== Print a verson 7 UUID on the terminal + +[source, sh] +.... +$ uuid -v 7 +d3891787-c952-af17-d697-0df3b85981e1 +.... + + === Create a new UUID as part of a path +[source, sh] .... dir="$PWD"/"$(uuid)"/data .... @@ -34,6 +45,7 @@ dir="$PWD"/"$(uuid)"/data === Validate a given UUID +[source, sh] .... ID="$(basename -- "$directory")" if ! uuid "$ID"; then @@ -48,6 +60,14 @@ fi The *uuid* utility generates a new UUID when no _STRING_ is given and write it to _stdout_. If a _STRING_ is given, *uuid* validates it and exits, and produces no output. +The *-v* option allows for choosing which type of UUID to be emitted, either version 4 ("the random one") or version 7 ("the sortable one"). When omitted, version 4 is chosen as default. + + + +== OPTIONS + +*-v NUMBER*:: Choose the UUID version *NUMBER* to be generated. Supported values are 4 (the default) and 7. + == OPERANDS @@ -71,12 +91,14 @@ Not used. The UUIDv4 format is made of byte blocks encoded as hexadecimals, using a <hyphen-minus>('`-`') as the block separator: +[source, sh] .... XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX .... An example output is: +[source, sh] .... cb46d0c0-b2aa-4a6c-a119-8deace2544a2 .... @@ -84,7 +106,15 @@ cb46d0c0-b2aa-4a6c-a119-8deace2544a2 === STDERR -Not used. +Errors on UUID validation are sent to the standard error. For instance: + +[source, sh] +.... +$ uuid not-a-uuid-123 1>/dev/null +uuid: str isn't of the correct length +.... + +When valid, validation emits nothing and exits with 0. === INPUT FILES @@ -107,7 +137,7 @@ None. == CONFORMING TO -The v4 UUID defined in *RFC 9562*. +The versions 4 and 7 of the UUID defined in *RFC 9562*. diff --git a/doc/uuid.eo.3.adoc b/doc/uuid.eo.3.adoc new file mode 100644 index 0000000..24fcde5 --- /dev/null +++ b/doc/uuid.eo.3.adoc @@ -0,0 +1,5 @@ += uuid(3) + +== NAME + +uuid - . diff --git a/doc/uuid.eo.7CHANGELOG.adoc b/doc/uuid.eo.7CHANGELOG.adoc new file mode 100644 index 0000000..e1b6975 --- /dev/null +++ b/doc/uuid.eo.7CHANGELOG.adoc @@ -0,0 +1,22 @@ += uuid(7CHANGELOG) + +== NAME + +uuid - . + +== DESCRIPTION + +//// +Entry template: +== Unreleased +=== Added +=== Changed +=== Deprecated +=== Removed +=== Fixed +=== Security +//// + +Changelog for https://euandre.org/s/uuid/en/[uuid]. + +== Unreleased diff --git a/doc/uuid.eo.7README.adoc b/doc/uuid.eo.7README.adoc new file mode 100644 index 0000000..3def718 --- /dev/null +++ b/doc/uuid.eo.7README.adoc @@ -0,0 +1,5 @@ += uuid(7README) + +== NAME + +uuid - . diff --git a/doc/uuid.eo.7recipes.adoc b/doc/uuid.eo.7recipes.adoc new file mode 100644 index 0000000..2f20a16 --- /dev/null +++ b/doc/uuid.eo.7recipes.adoc @@ -0,0 +1,5 @@ += uuid(7recipes) + +== NAME + +uuid - . diff --git a/doc/uuid.eo.7tutorial.adoc b/doc/uuid.eo.7tutorial.adoc new file mode 100644 index 0000000..1a77799 --- /dev/null +++ b/doc/uuid.eo.7tutorial.adoc @@ -0,0 +1,5 @@ += uuid(7tutorial) + +== NAME + +uuid - . diff --git a/doc/uuid.eo.7why.adoc b/doc/uuid.eo.7why.adoc new file mode 100644 index 0000000..51096c1 --- /dev/null +++ b/doc/uuid.eo.7why.adoc @@ -0,0 +1,5 @@ += uuid(7why) + +== NAME + +uuid - . diff --git a/doc/uuid.es.0.adoc b/doc/uuid.es.0.adoc new file mode 100644 index 0000000..1670ad5 --- /dev/null +++ b/doc/uuid.es.0.adoc @@ -0,0 +1,13 @@ += uuid(0) + + + +== NAME + +uuid - generate or parse UUID values. + + + +== DESCRIPTION + +*uuid* generates UUID of version 4 or version 7, or validate a given UUID. diff --git a/doc/uuid.es.1.adoc b/doc/uuid.es.1.adoc index a0d507b..e64c665 100644 --- a/doc/uuid.es.1.adoc +++ b/doc/uuid.es.1.adoc @@ -4,29 +4,40 @@ == NAME -uuid - generate or validate a UUIDv4 +uuid - generate a UUID version 4 or 7, or validate a UUID string. == SYNOPSYS -*uuid* [_STRING_] +*uuid* [-v (4|7)] *uuid* [_STRING_] == EXAMPLES -=== Print a UUID on the terminal +=== Print a (version 4) UUID on the terminal +[source, sh] .... $ uuid d3891787-c952-af17-d697-0df3b85981e1 .... +=== Print a verson 7 UUID on the terminal + +[source, sh] +.... +$ uuid -v 7 +d3891787-c952-af17-d697-0df3b85981e1 +.... + + === Create a new UUID as part of a path +[source, sh] .... dir="$PWD"/"$(uuid)"/data .... @@ -34,6 +45,7 @@ dir="$PWD"/"$(uuid)"/data === Validate a given UUID +[source, sh] .... ID="$(basename -- "$directory")" if ! uuid "$ID"; then @@ -48,6 +60,14 @@ fi The *uuid* utility generates a new UUID when no _STRING_ is given and write it to _stdout_. If a _STRING_ is given, *uuid* validates it and exits, and produces no output. +The *-v* option allows for choosing which type of UUID to be emitted, either version 4 ("the random one") or version 7 ("the sortable one"). When omitted, version 4 is chosen as default. + + + +== OPTIONS + +*-v NUMBER*:: Choose the UUID version *NUMBER* to be generated. Supported values are 4 (the default) and 7. + == OPERANDS @@ -71,12 +91,14 @@ Not used. The UUIDv4 format is made of byte blocks encoded as hexadecimals, using a <hyphen-minus>('`-`') as the block separator: +[source, sh] .... XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX .... An example output is: +[source, sh] .... cb46d0c0-b2aa-4a6c-a119-8deace2544a2 .... @@ -84,7 +106,15 @@ cb46d0c0-b2aa-4a6c-a119-8deace2544a2 === STDERR -Not used. +Errors on UUID validation are sent to the standard error. For instance: + +[source, sh] +.... +$ uuid not-a-uuid-123 1>/dev/null +uuid: str isn't of the correct length +.... + +When valid, validation emits nothing and exits with 0. === INPUT FILES @@ -107,7 +137,7 @@ None. == CONFORMING TO -The v4 UUID defined in *RFC 9562*. +The versions 4 and 7 of the UUID defined in *RFC 9562*. diff --git a/doc/uuid.es.3.adoc b/doc/uuid.es.3.adoc new file mode 100644 index 0000000..24fcde5 --- /dev/null +++ b/doc/uuid.es.3.adoc @@ -0,0 +1,5 @@ += uuid(3) + +== NAME + +uuid - . diff --git a/doc/uuid.es.7CHANGELOG.adoc b/doc/uuid.es.7CHANGELOG.adoc new file mode 100644 index 0000000..e1b6975 --- /dev/null +++ b/doc/uuid.es.7CHANGELOG.adoc @@ -0,0 +1,22 @@ += uuid(7CHANGELOG) + +== NAME + +uuid - . + +== DESCRIPTION + +//// +Entry template: +== Unreleased +=== Added +=== Changed +=== Deprecated +=== Removed +=== Fixed +=== Security +//// + +Changelog for https://euandre.org/s/uuid/en/[uuid]. + +== Unreleased diff --git a/doc/uuid.es.7README.adoc b/doc/uuid.es.7README.adoc new file mode 100644 index 0000000..3def718 --- /dev/null +++ b/doc/uuid.es.7README.adoc @@ -0,0 +1,5 @@ += uuid(7README) + +== NAME + +uuid - . diff --git a/doc/uuid.es.7recipes.adoc b/doc/uuid.es.7recipes.adoc new file mode 100644 index 0000000..2f20a16 --- /dev/null +++ b/doc/uuid.es.7recipes.adoc @@ -0,0 +1,5 @@ += uuid(7recipes) + +== NAME + +uuid - . diff --git a/doc/uuid.es.7tutorial.adoc b/doc/uuid.es.7tutorial.adoc new file mode 100644 index 0000000..1a77799 --- /dev/null +++ b/doc/uuid.es.7tutorial.adoc @@ -0,0 +1,5 @@ += uuid(7tutorial) + +== NAME + +uuid - . diff --git a/doc/uuid.es.7why.adoc b/doc/uuid.es.7why.adoc new file mode 100644 index 0000000..51096c1 --- /dev/null +++ b/doc/uuid.es.7why.adoc @@ -0,0 +1,5 @@ += uuid(7why) + +== NAME + +uuid - . diff --git a/doc/uuid.fr.0.adoc b/doc/uuid.fr.0.adoc new file mode 100644 index 0000000..1670ad5 --- /dev/null +++ b/doc/uuid.fr.0.adoc @@ -0,0 +1,13 @@ += uuid(0) + + + +== NAME + +uuid - generate or parse UUID values. + + + +== DESCRIPTION + +*uuid* generates UUID of version 4 or version 7, or validate a given UUID. diff --git a/doc/uuid.fr.1.adoc b/doc/uuid.fr.1.adoc index a0d507b..e64c665 100644 --- a/doc/uuid.fr.1.adoc +++ b/doc/uuid.fr.1.adoc @@ -4,29 +4,40 @@ == NAME -uuid - generate or validate a UUIDv4 +uuid - generate a UUID version 4 or 7, or validate a UUID string. == SYNOPSYS -*uuid* [_STRING_] +*uuid* [-v (4|7)] *uuid* [_STRING_] == EXAMPLES -=== Print a UUID on the terminal +=== Print a (version 4) UUID on the terminal +[source, sh] .... $ uuid d3891787-c952-af17-d697-0df3b85981e1 .... +=== Print a verson 7 UUID on the terminal + +[source, sh] +.... +$ uuid -v 7 +d3891787-c952-af17-d697-0df3b85981e1 +.... + + === Create a new UUID as part of a path +[source, sh] .... dir="$PWD"/"$(uuid)"/data .... @@ -34,6 +45,7 @@ dir="$PWD"/"$(uuid)"/data === Validate a given UUID +[source, sh] .... ID="$(basename -- "$directory")" if ! uuid "$ID"; then @@ -48,6 +60,14 @@ fi The *uuid* utility generates a new UUID when no _STRING_ is given and write it to _stdout_. If a _STRING_ is given, *uuid* validates it and exits, and produces no output. +The *-v* option allows for choosing which type of UUID to be emitted, either version 4 ("the random one") or version 7 ("the sortable one"). When omitted, version 4 is chosen as default. + + + +== OPTIONS + +*-v NUMBER*:: Choose the UUID version *NUMBER* to be generated. Supported values are 4 (the default) and 7. + == OPERANDS @@ -71,12 +91,14 @@ Not used. The UUIDv4 format is made of byte blocks encoded as hexadecimals, using a <hyphen-minus>('`-`') as the block separator: +[source, sh] .... XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX .... An example output is: +[source, sh] .... cb46d0c0-b2aa-4a6c-a119-8deace2544a2 .... @@ -84,7 +106,15 @@ cb46d0c0-b2aa-4a6c-a119-8deace2544a2 === STDERR -Not used. +Errors on UUID validation are sent to the standard error. For instance: + +[source, sh] +.... +$ uuid not-a-uuid-123 1>/dev/null +uuid: str isn't of the correct length +.... + +When valid, validation emits nothing and exits with 0. === INPUT FILES @@ -107,7 +137,7 @@ None. == CONFORMING TO -The v4 UUID defined in *RFC 9562*. +The versions 4 and 7 of the UUID defined in *RFC 9562*. diff --git a/doc/uuid.fr.3.adoc b/doc/uuid.fr.3.adoc new file mode 100644 index 0000000..24fcde5 --- /dev/null +++ b/doc/uuid.fr.3.adoc @@ -0,0 +1,5 @@ += uuid(3) + +== NAME + +uuid - . diff --git a/doc/uuid.fr.7CHANGELOG.adoc b/doc/uuid.fr.7CHANGELOG.adoc new file mode 100644 index 0000000..e1b6975 --- /dev/null +++ b/doc/uuid.fr.7CHANGELOG.adoc @@ -0,0 +1,22 @@ += uuid(7CHANGELOG) + +== NAME + +uuid - . + +== DESCRIPTION + +//// +Entry template: +== Unreleased +=== Added +=== Changed +=== Deprecated +=== Removed +=== Fixed +=== Security +//// + +Changelog for https://euandre.org/s/uuid/en/[uuid]. + +== Unreleased diff --git a/doc/uuid.fr.7README.adoc b/doc/uuid.fr.7README.adoc new file mode 100644 index 0000000..3def718 --- /dev/null +++ b/doc/uuid.fr.7README.adoc @@ -0,0 +1,5 @@ += uuid(7README) + +== NAME + +uuid - . diff --git a/doc/uuid.fr.7recipes.adoc b/doc/uuid.fr.7recipes.adoc new file mode 100644 index 0000000..2f20a16 --- /dev/null +++ b/doc/uuid.fr.7recipes.adoc @@ -0,0 +1,5 @@ += uuid(7recipes) + +== NAME + +uuid - . diff --git a/doc/uuid.fr.7tutorial.adoc b/doc/uuid.fr.7tutorial.adoc new file mode 100644 index 0000000..1a77799 --- /dev/null +++ b/doc/uuid.fr.7tutorial.adoc @@ -0,0 +1,5 @@ += uuid(7tutorial) + +== NAME + +uuid - . diff --git a/doc/uuid.fr.7why.adoc b/doc/uuid.fr.7why.adoc new file mode 100644 index 0000000..51096c1 --- /dev/null +++ b/doc/uuid.fr.7why.adoc @@ -0,0 +1,5 @@ += uuid(7why) + +== NAME + +uuid - . diff --git a/doc/uuid.pt.0.adoc b/doc/uuid.pt.0.adoc new file mode 100644 index 0000000..1670ad5 --- /dev/null +++ b/doc/uuid.pt.0.adoc @@ -0,0 +1,13 @@ += uuid(0) + + + +== NAME + +uuid - generate or parse UUID values. + + + +== DESCRIPTION + +*uuid* generates UUID of version 4 or version 7, or validate a given UUID. diff --git a/doc/uuid.pt.1.adoc b/doc/uuid.pt.1.adoc index a0d507b..e64c665 100644 --- a/doc/uuid.pt.1.adoc +++ b/doc/uuid.pt.1.adoc @@ -4,29 +4,40 @@ == NAME -uuid - generate or validate a UUIDv4 +uuid - generate a UUID version 4 or 7, or validate a UUID string. == SYNOPSYS -*uuid* [_STRING_] +*uuid* [-v (4|7)] *uuid* [_STRING_] == EXAMPLES -=== Print a UUID on the terminal +=== Print a (version 4) UUID on the terminal +[source, sh] .... $ uuid d3891787-c952-af17-d697-0df3b85981e1 .... +=== Print a verson 7 UUID on the terminal + +[source, sh] +.... +$ uuid -v 7 +d3891787-c952-af17-d697-0df3b85981e1 +.... + + === Create a new UUID as part of a path +[source, sh] .... dir="$PWD"/"$(uuid)"/data .... @@ -34,6 +45,7 @@ dir="$PWD"/"$(uuid)"/data === Validate a given UUID +[source, sh] .... ID="$(basename -- "$directory")" if ! uuid "$ID"; then @@ -48,6 +60,14 @@ fi The *uuid* utility generates a new UUID when no _STRING_ is given and write it to _stdout_. If a _STRING_ is given, *uuid* validates it and exits, and produces no output. +The *-v* option allows for choosing which type of UUID to be emitted, either version 4 ("the random one") or version 7 ("the sortable one"). When omitted, version 4 is chosen as default. + + + +== OPTIONS + +*-v NUMBER*:: Choose the UUID version *NUMBER* to be generated. Supported values are 4 (the default) and 7. + == OPERANDS @@ -71,12 +91,14 @@ Not used. The UUIDv4 format is made of byte blocks encoded as hexadecimals, using a <hyphen-minus>('`-`') as the block separator: +[source, sh] .... XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX .... An example output is: +[source, sh] .... cb46d0c0-b2aa-4a6c-a119-8deace2544a2 .... @@ -84,7 +106,15 @@ cb46d0c0-b2aa-4a6c-a119-8deace2544a2 === STDERR -Not used. +Errors on UUID validation are sent to the standard error. For instance: + +[source, sh] +.... +$ uuid not-a-uuid-123 1>/dev/null +uuid: str isn't of the correct length +.... + +When valid, validation emits nothing and exits with 0. === INPUT FILES @@ -107,7 +137,7 @@ None. == CONFORMING TO -The v4 UUID defined in *RFC 9562*. +The versions 4 and 7 of the UUID defined in *RFC 9562*. diff --git a/doc/uuid.pt.3.adoc b/doc/uuid.pt.3.adoc new file mode 100644 index 0000000..24fcde5 --- /dev/null +++ b/doc/uuid.pt.3.adoc @@ -0,0 +1,5 @@ += uuid(3) + +== NAME + +uuid - . diff --git a/doc/uuid.pt.7CHANGELOG.adoc b/doc/uuid.pt.7CHANGELOG.adoc new file mode 100644 index 0000000..e1b6975 --- /dev/null +++ b/doc/uuid.pt.7CHANGELOG.adoc @@ -0,0 +1,22 @@ += uuid(7CHANGELOG) + +== NAME + +uuid - . + +== DESCRIPTION + +//// +Entry template: +== Unreleased +=== Added +=== Changed +=== Deprecated +=== Removed +=== Fixed +=== Security +//// + +Changelog for https://euandre.org/s/uuid/en/[uuid]. + +== Unreleased diff --git a/doc/uuid.pt.7README.adoc b/doc/uuid.pt.7README.adoc new file mode 100644 index 0000000..3def718 --- /dev/null +++ b/doc/uuid.pt.7README.adoc @@ -0,0 +1,5 @@ += uuid(7README) + +== NAME + +uuid - . diff --git a/doc/uuid.pt.7recipes.adoc b/doc/uuid.pt.7recipes.adoc new file mode 100644 index 0000000..2f20a16 --- /dev/null +++ b/doc/uuid.pt.7recipes.adoc @@ -0,0 +1,5 @@ += uuid(7recipes) + +== NAME + +uuid - . diff --git a/doc/uuid.pt.7tutorial.adoc b/doc/uuid.pt.7tutorial.adoc new file mode 100644 index 0000000..1a77799 --- /dev/null +++ b/doc/uuid.pt.7tutorial.adoc @@ -0,0 +1,5 @@ += uuid(7tutorial) + +== NAME + +uuid - . diff --git a/doc/uuid.pt.7why.adoc b/doc/uuid.pt.7why.adoc new file mode 100644 index 0000000..51096c1 --- /dev/null +++ b/doc/uuid.pt.7why.adoc @@ -0,0 +1,5 @@ += uuid(7why) + +== NAME + +uuid - . |