command not found

0

Another newbie question

echo "Enter an integer number"
read int
checkNum=$(( int % 2 ))

if [$checkNum -eq '0' ]; then

 echo "the number is even"
else
  echo "the number is odd"
fi

Error when entering any number:

  

./ test4.sh: line 9: [0: command not found   the number is odd

    
asked by anonymous 09.12.2017 / 06:50

0 answers