Skip to content

Instantly share code, notes, and snippets.

@markz0r
Created September 17, 2019 05:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save markz0r/bc306bb1f0dbf72623647a8f47f65b4a to your computer and use it in GitHub Desktop.
Save markz0r/bc306bb1f0dbf72623647a8f47f65b4a to your computer and use it in GitHub Desktop.
number=$1
i=$2
f=0
while [[ $i -le `expr $number / 2` ]]; do
if test `expr $number % $i` -eq 0
then
f=1
fi
i=`expr $i + 1`
done
if test $f -eq 1; then
echo "Not something"
else
echo "Is something"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment