diff --git a/TipsShell.md b/TipsShell.md index fbec3b3a..c6d1581b 100644 --- a/TipsShell.md +++ b/TipsShell.md @@ -766,12 +766,18 @@ $ tr -cd [:alnum:] < /dev/urandom | head -c22; echo ### En hexadecimal -Pour générer 6 octets en hexadecimal : +Pour générer 12 charactères : ~~~{.bash} $ openssl rand -hex 6 ~~~ +Sans la commande `openssl` : + +~~~{.bash} +tr -cd a-f0-9 < /dev/urandom | head -c12; echo +~~~ + ## Variables Les variables d'environnement actuelles :