LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   another equivalent to c question? (https://www.linuxquestions.org/questions/programming-9/another-equivalent-to-c-question-55211/)

codename000 04-15-2003 05:44 PM

another equivalent to c question?
 
i wonder what is the replacement for modulus in shell script?

i want to do a remainder check for say
if (120%10 ==4)
printf "hello!!\n";

is there such a replacement?? thx in adv

AltF4 04-15-2003 06:01 PM

Bash:

ACTION OPERATOR
Addition +
Subtraction -
Multiplication *
Division /
Modulus %

codename000 04-15-2003 08:28 PM

so it's more or less the same then??
let me see....




yeah, sorted my problem...dunno y it gave me errors before...anyway, thx a lot man!!

AltF4 04-16-2003 04:40 AM

no problem :-)


All times are GMT -5. The time now is 02:23 AM.