Skip to content

Instantly share code, notes, and snippets.

@markz0r markz0r/p.sh
Created Sep 17, 2019

Embed
What would you like to do?
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
You can’t perform that action at this time.