On Tue, 30 Apr 2002, christopher j bottaro wrote:

> SUFFIX=${UID} % 100

Um, what the heck are you trying to do? This doesn't seem particularly 
useful, epecially if you have large numbers of UIDs. You might also want 
to consider moving these sorts of non-Red Hat questions to a shell 
programming mailing list instead.

That said, if for some bizarre reason you just want the modulus 100 of the
UID, use:

        MOD_100=$(( $UID % 100 ))

I'd also recommend spending some time with "info bash" and the bash
reference manual at http://www.gnu.org/manual/bash-2.02/bashref.html to
gain a better understanding of bash variables, expansions, and shell
arithmetic.

-- 
"The only thing that helps me maintain my slender grip on reality is the
friendship I share with my collection of singing potatoes."

                        - Holly, JMC Vessel *Red Dwarf*



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to