From owner-freebsd-questions@FreeBSD.ORG Thu Sep 18 04:00:05 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3469816A4B3 for ; Thu, 18 Sep 2003 04:00:05 -0700 (PDT) Received: from remt26.cluster1.charter.net (remt26.cluster1.charter.net [209.225.8.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id 72C9643FDF for ; Thu, 18 Sep 2003 04:00:04 -0700 (PDT) (envelope-from chowse@charter.net) Received: from [66.168.145.25] (HELO moe) by remt26.cluster1.charter.net (CommuniGate Pro SMTP 4.0.6) with ESMTP id 159974760; Thu, 18 Sep 2003 07:00:03 -0400 From: "Charles Howse" To: "'Rob Lahaye'" , "'Gil Agno Virtucio'" , Date: Thu, 18 Sep 2003 05:59:57 -0500 Message-ID: <001801c37dd3$fff4f180$04fea8c0@moe> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2616 In-Reply-To: <3F698F28.7080902@snu.ac.kr> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Importance: Normal Subject: RE: randomize execution the a script? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Sep 2003 11:00:05 -0000 > > 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! :)