Results 1 to 5 of 5
hi all,
how to use RANDOM function in bash?
for example i have couple words:
vegas*harrahs, venture capital, viagra, v1agra, vi@gra, vi*agra,
viagr@, vicodin, video professor, violence, vioxx, virginity*, virus ...
- 02-21-2008 #1Just Joined!
- Join Date
- Aug 2006
- Posts
- 32
random function
hi all,
how to use RANDOM function in bash?
for example i have couple words:
vegas*harrahs, venture capital, viagra, v1agra, vi@gra, vi*agra,
viagr@, vicodin, video professor, violence, vioxx, virginity*, virus alert,
virus detected
and i want to use RANDOm function to create as many possible words there can be plus using numbers 0-9.
I want to create database for keyword filtering in exchange.
thanks
- 02-21-2008 #2
If you want to do keyword filtering, you don't want to generate words using the random function. You want to permute through all possible combinations, omitting none.
And even that would likely produce more words than you could conveniently store. This problem does not scale well.
No, the only reason you would want to use a random function would be if you were trying to generate spam in the first place.--
Bill
Old age and treachery will overcome youth and skill.
- 02-21-2008 #3Just Joined!
- Join Date
- Aug 2006
- Posts
- 32
re
that is one of two answers that i was afraid of that someone might give me.
but that's ok.
- 02-21-2008 #4Just Joined!
- Join Date
- Aug 2006
- Posts
- 32
so how can i permute through all possible combinations, omitting none ??
thanks
- 02-21-2008 #5
For help on bash string manipulation, google this:
But the best thing to do before even starting this project is ask yourself whether it's even feasible: Do you have any idea how many words you are going to produce? Billions and billions. Where are you going to store them all? How would you access one of them?Code:bash tutorial substring
As previously mentioned, this project does not scale well. Unless you only want one or two for the purpose of producing spam, and you've already said that you're not doing that.
Producing spam is the only context in which this adventure makes any sense.--
Bill
Old age and treachery will overcome youth and skill.


Reply With Quote