#!/bin/bash
Echo “Enter a number”
Read $number
If [$number ] ; then
Echo “Your number is divisible by 5”
Else
Echo “Your number is not divisible by 5”
fi
the if [$number] statement is what I don't know how to set up

You can use a simpler syntax in Bash than some of the others shown here:



No bc needed as long as it's integer math (you'll need bc for floating point though): In bash, the (( )) operator works like expr. As others have pointed out the operation you want is modulo (%).



How about using the



I have done it in a different way. Check if it works for you.
Example 2 :
Simple logic. 12 / 3 = 4 11 / 3 = 3 


Nagul's answer is great, but just fyi, the operation you want is modulus (or modulo) and the operator is generally 


Just in the interest of syntax neutrality and mending the overt infix notation bias around these parts, I've modified nagul's solution to use


