![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to set constrain on random numbers in c | ahjiefreak | High Level Programming | 6 | 01-11-2008 04:46 AM |
| how can i isolate the random sequence of numbers using awk? | rcon1 | UNIX for Dummies Questions & Answers | 2 | 01-09-2008 09:06 AM |
| generating random numbers with hamming distance 4 | hack_tom | Shell Programming and Scripting | 2 | 04-29-2007 01:27 AM |
| genrating pseudo random numbers | hack_tom | Shell Programming and Scripting | 7 | 04-27-2007 10:10 PM |
| Sed - Replacing numbers w/asteriks in random location in a file | giannicello | UNIX for Dummies Questions & Answers | 9 | 10-04-2001 12:03 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Thanks, great code !!! but I need some clarifications.
when you compare the generated number to previous one, using : if (!(numb in prev)) isn't comparing only the last generated random number with the current one or comparing all previous generated random number ? so only uniq number retained. Thanks |
|
||||
|
I actually want to use those random number on the fly such :
#! /bin/bash while (condition) do number=$RANDOM do some work here using random number until condition satisfied done the condition is independent of generated random number but random numbers have to be generated as along as condition is met and all numbers generated have to be unique. Thanks again |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|