This program is suppose to accept a number from the user and print that many prime numbers. For some reason the program doesn\'t work. I am new to bash scripting and this is my
Like the others have said, the [
program needs a space before its parameters, like all programs need a space before their args. This is one reason why I prefer the test
builtin to [
with its kludgy syntax requiring a useless ]
as the last arg just to make it look pretty and sane.
if test $((i % j)) = 0; then
break
fi