![]() |
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 |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| generate random number in perl | zx1106 | Shell Programming and Scripting | 2 | 03-18-2008 12:13 AM |
| how do i generate random integer using only shell script | sridhusha | Shell Programming and Scripting | 1 | 12-31-2007 03:46 AM |
| Generate a random password | chiru_h | Shell Programming and Scripting | 5 | 10-07-2007 08:03 PM |
| replacing a number with random variable inside shell script | user_prady | Shell Programming and Scripting | 3 | 09-11-2007 02:44 AM |
| How to generate a random number? | MacMonster | High Level Programming | 2 | 10-15-2001 12:35 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
generate random number in korn shell
I want to be able to generate a random number within a korn shell script..
Preferably i would like to be able to state how many digits should be in this random number... ie 4 digits or 5 digits etc Any ideas? |
|
|||||
|
X=$RANDOM
will invoke ksh's internal random number generator. If that is not good enough, you need to specify exactly what you are doing with the random number and how you are measuring randomness. See my password generator for a more robust random number generator written in ksh. swordfish a password generator |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|