Skip to content

Instantly share code, notes, and snippets.

@zanona
Created April 8, 2022 11:54
Show Gist options
  • Save zanona/6f33ad30c18c8a2a2cc673f6bc7590b9 to your computer and use it in GitHub Desktop.
Save zanona/6f33ad30c18c8a2a2cc673f6bc7590b9 to your computer and use it in GitHub Desktop.
shell script random username generator
#!/bin/env sh
# usage: [sep] adds a separator between adjective and noum .ie: randname "-"
# source: https://grammar.yourdictionary.com/parts-of-speech/adjectives/list-of-positive-adjectives.html
# source: https://eslgrammar.org/list-of-nouns/
ADJECTIVES="affectionate agreeable amiable bright charming creative determined diligent diplomatic dynamic energetic friendly funny generous giving gregarious hardworking helpful imaginative kind likable loyal patient polite sincere adept brave capable considerate courageous faithful fearless frank humorous knowledgeable loving marvelous nice optimistic passionate persistent plucky proficient romantic self-confident sensible thoughtful warmhearted willing zestful amazing awesome blithesome excellent fabulous favorable fortuitous gorgeous incredible unique mirthful outstanding perfect philosophical propitious remarkable rousing spectacular splendid stellar stupendous super upbeat stunning wondrous alluring ample bountiful brilliant breathtaking dazzling elegant enchanting gleaming glimmering glistening glittering glowing lovely lustrous magnificent ravishing shimmering shining sleek sparkling twinkling vivid vibrant vivacious adaptable ambitious approachable competitive confident customer-focused devoted educated efficient fast-paced flexible focused honest independent inquisitive insightful open-minded organized personable productive qualified relaxed resourceful responsible technological engaging engrossing captivating fantastic gripping heart-warming hilarious imaginative moving powerful spellbinding thought-provoking"
NOUNS="actor gold painting advertisement grass parrot afternoon greece pencil airport guitar piano ambulance hair pillow animal hamburger pizza answer helicopter planet apple helmet plastic army holiday portugal australia honey potato balloon horse queen banana hospital quill battery house rain beach hydrogen rainbow beard ice raincoat bed insect refrigerator belgium insurance restaurant boy iron river branch island rocket breakfast jackal room brother jelly rose camera jewellery russia candle jordan sandwich car juice school caravan kangaroo scooter carpet king shampoo cartoon kitchen shoe china kite soccer church knife spoon crayon lamp stone crowd lawyer sugar daughter leather sweden death library teacher denmark lighter telephone diamond lion television dinner lizard tent disease lock thailand doctor london tomato dog lunch toothbrush dream machine traffic dress magazine train easter magician truck egg manchester uganda eggplant market umbrella egypt match van elephant microphone vase energy monkey vegetable engine morning vulture england motorcycle wall evening nail whale eye napkin window family needle wire finland nest xylophone fish nigeria yacht flag night yak flower notebook zebra football ocean zoo forest oil garden fountain orange gas france oxygen girl furniture oyster glass garage ghost"
SEP="$1"
sample() {
ARR=($(echo "$1" | tr ' ' '\n'))
echo "${ARR[$RANDOM % ${#ARR[@]}]}"
}
echo "$(sample "$ADJECTIVES")$SEP$(sample "$NOUNS")"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment