Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Sep 2003 05:59:57 -0500
From:      "Charles Howse" <chowse@charter.net>
To:        "'Rob Lahaye'" <lahaye@snu.ac.kr>, "'Gil Agno Virtucio'" <gihl@nesic.com.ph>, <freebsd-questions@FreeBSD.ORG>
Subject:   RE: randomize execution the a script?
Message-ID:  <001801c37dd3$fff4f180$04fea8c0@moe>
In-Reply-To: <3F698F28.7080902@snu.ac.kr>

next in thread | previous in thread | raw e-mail | index | archive | help
> > I don't happen to have random installed on my system, however jot is
>=20
> It's in /usr/games/random of FreeBSD 4.8.
>=20
> > Won't randomNumber=3D$? Just return 0 if the previous command=20
> completes
> > successfully?
> > Shouldn't it be:
> > randomNumber=3D`random -e 60`
>=20
> No. In 'man 6 random', it says:
>=20
>      random [-er] [-f filename] [denominator]
>=20
>      -e      If the -e option is specified, random does not=20
> read or write any-
>              thing, and simply exits with a random exit value of 0 to
>              denominator - 1, inclusive.
>=20
> So you must capture its exit value for the random number :).

Good enough!  Thanks for the info!  :)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?001801c37dd3$fff4f180$04fea8c0>