Bash program to check if the Number is a Prime or not
Given a number, the task is to find whether the given number is prime or not using Bash Scripting.
Input: N = 43 Output: Prime Input: N = 35 Output: Not Prime
We run a loop from 2 to number/2 and check if there is any factor of the number. If we find any factor then the number is composite otherwise prime.