Numeric output and dont echo repeating numbers for ex 1010101; 2020202, 1212121
<p>Looking for a script that can pipe or print to file and generate a random, non repeating output wordlist/numberlist [crunch for example can do that with the -d option but 10101 etc dont get sorted out]. </p>

<p>Example:  a numeric list <code>000000-999999</code> and written to a file / pipe to program all numbers but no repeating sequences like <code>1010101; 2020202; 12121212, 13131313 ......</code> or repeating numbers <code>11 222 3333 44444 .....</code></p>

<p>EDIT:</p>

<p>Great answers so far, thank you.</p>

<p>Heres a little hack that does pretty much what is intented, but not perfectly.
Looking for a solution to have the result directly, going through the answers asap.</p>

<pre><code>sed -i  -e '/1010/d' -e '/1212/d' file.txt
</code></pre>

<p>Source:
<a href="http://stackoverflow.com/questions/5410757/delete-lines-in-a-text-file-that-containing-a-specific-string">Delete lines in a text file that containing a specific string</a></p>

<p>Your question is not completely clear.  Is 123435 allowed, since the 3 is repeated?</p>

<p>Assuming absolutely no repetition is required, then put the ten digits [0..9] in an array, shuffle the array and pick off the first six digits.  If you don't want a leading zero, then if necessary drop the leading zero and add the seventh digit from the shuffle at the end to get back to six digits.</p>

python bash perl random sequence