On Wed, Jul 11, 2001 at 04:09:56PM -0400, Bob Bell wrote:
> >     ii=`echo $RANDOM`; echo ${ii#${ii%[0-9]}}
> 
> Why not use bash to compute the remainder?  For instance, if you have
> 13 signature files, compute 0-12 (pseudo-)randomly with:
>     $((RANDOM%13))

Yes, I forgot that Bash can do modulus.

-- 
William Park, Open Geometry Consulting, <[EMAIL PROTECTED]>
8 CPUs cluster, (Slackware) Linux, Python, LaTeX, Vim, Mutt, Sc.

Reply via email to