Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

module

Status
Not open for further replies.

Yarka

Technical User
Jan 14, 2007
192
ES
How I can know if a number is module another number in bash scripting?
For example: 40 module 5 = 0

Thanks.
 
I'm not sure but I think it is the % operator you are referring to. Try this:

(( a=40 ))
(( amod5=a%5 ))



HTH,

p5wizard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top