rand_string
Synopsis
Section titled “Synopsis”rand_string [COMPONENTS/MODIFIERS]...Description
Section titled “Description”Generates a random, memorable string using a sequence of specified word categories and formatting modifiers. Words are pulled from curated plain-text databases bundled in data/words/.
Modifiers like --separator and --case are evaluated sequentially and apply only to the components that follow them.
Supported Components:
<category> |
A bundled word list (e.g. adjective, animal, color, name, noun, verb) |
digits=<N> |
N random digits (e.g. digits=3 -> 842) |
literal=<text> |
A static string component (e.g. literal=TEST) |
Arguments
Section titled “Arguments”-s, --separator=<sep> |
Delimiter for subsequent words (dash, underscore, dot, none, or literal chars) |
-c, --case=<casing> |
Casing for subsequent words (lower, upper, title) |
-h, --help |
Show usage help |
Exit Status
Section titled “Exit Status”0 |
String generated successfully |
1 |
Word lists directory not found |
2 |
Unknown category |
Falls back to random choice if GNU shuf is missing, but shuf is much faster for files with >1000 lines.
Example
Section titled “Example”rand_string adjective animalrand_string --case=title color animal --separator=dot digits=4rand_string literal=TEST --separator=underscore verb nounDependencies: shuf
Classification: bypasses-shadow(cat)