Bash: Generating a random LETTERS sequence
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. |
Pick your favourite language, check out the ASCII values for each character and go for it.
|
Quote:
Code:
cat /dev/urandom| tr -dc '0-9a-zA-Z!@#$%^&*_+-'|head -c 8 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. |
|
All times are GMT -5. The time now is 06:11 AM. |