You can pull a psuedo random number from /dev/urandom or /dev/random
using the following:

dd if=/dev/urandom count=1 2> /dev/null | cksum | cut -f1 -d" "

You can look here for more info:
http://linuxgazette.net/issue55/tag/4.html

Hope this helps

        Trev

On Sat, 2006-03-11 at 08:50 +1300, Bruce McNamara wrote:
> I have a script running via a cron job on my Bering uClib firewalls 
> (V2.4rc1) which runs just past the hour and extracts some network usage 
> data and emails it back to my reporting system.
> 
> Ths works great but I need to have some way to make the script wait a 
> random period of time within a window of 1 to 10 minutes before it runs 
> the email of the data to me (this way each firewall doesent email the data
> at the same time).
> 
> I have tried the variable $RANDOM but this doesent return any value
> Has anyone got a simple script caplable of doing this??
> 
> Thanks in advance
> 
> Bruce
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking scripting language
> that extends applications into web and mobile media. Attend the live webcast
> and join the prime developer group breaking into this new coding territory!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
> ------------------------------------------------------------------------
> leaf-user mailing list: leaf-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/leaf-user
> Support Request -- http://leaf-project.org/
> 
> 
-- 
Trev Peterson <[EMAIL PROTECTED]>
Advanced Reality



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
------------------------------------------------------------------------
leaf-user mailing list: leaf-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/leaf-user
Support Request -- http://leaf-project.org/

Reply via email to