Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hello Every one,
I am new in Linux. I am looking for a word list generator that generate word like this..
let say i want to generate 10 char long word but if one single char repeat 3 time then that should not store in the word list.
Example:
we want to generate 10 digit long word-list using crunch.
crunch will generate first line:
0000000000
"
"
9999999999 (last line in wodrlist)
now what we want here:
0001234567 take a look 0 is repeat 3 times. it should not store in word-list file.
or > 1234567772 take a look 7 is repeat 3 times. it should not store in word-list file.
Or > 9045833321 take a look 3 is repeat 3 times. it should not store in word-list file.
now if we want to generate a to z combination then
qxxxhygtbr, x is repeat 3 times . it should not store in word-list file.
Any help.
Thanks for your time
Here is a possible algorithm to get you started...
loop through all generated strings.
for each string, loop through all characters.
increment a counter (starting at 0 for each string) if a character equals the previous character and reset the counter to 0 otherwise
discard the string if the counter reaches or exceeds 2.
I am assuming there would also be some smart expression matching approaches that could handle this more elegantly...
Last edited by joe_2000; 05-27-2014 at 04:01 PM.
Reason: counter reset
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.