[BASH]: Prime Numbers

view full story

http://forums.fedoraforum.org – Heyas Its been a while since i've done some math, so out of curiousity and 'fun' i wanted to write a bash script doing that. AFAIK: A prime number is defined by any number that is only dividable by 1 or itself. AFAIK: Bash works only with integer numbers, which uses no coma seperation. Prime Numbers are not EVEN So at first a think of a function that helps to me skip every even number (eg 4,8,18,100), to save some 'math power'. So that function simply divides provided number by 2 and looks if the half number * 2 equals the original number. I've modified the function so i can pass (HowTos)