Originally Posted by iniuria
Hi, everyone. I tried googling around but i cant find anything related to this: everyone seems just interested in random numbers, so when it comes to random letters there is a lack of informations.
However, i am trying to figure out a wait to get a random letters string that matches a simple rule: it must be a sequence of consonant+vowel. So for example, these are some 6 letters strings i would like to obtain: wolupa, tafoke, zewevu, cupimo.
I dont really need a full script, a one-liner would be very appreciated.
Thanks to anyone willing to help.
You have an endless supply of pseudo-random characters in /dev/urandom, so you could use something like that:
cat /dev/urandom| tr -dc '0-9a-zA-Z!@#$%^&*_+-'|head -c 8
To get absolutely meaningless and unpronounceable sequence of letters.
You could also prepare array of letter pairs, and select several letter combinations using random index within array.
Using a large english text, you could generate frequency frequency tables, then generate a word using frequency tables. You can easily find few name generators on the internet (some of them are written in python) that work this way.
By the way, before generating readable words, you may want to read about automated curse generator
. Just in case.