Following script
read n
for (( c=1; c<=$n; c++ ))
do
echo "HI"
done
gives error solution.sh: line 2: ((: c<=1: syntax error: invalid arithmetic operator (error token is "")
I am using BASH. What is wrong with the for
loop?
edit: I am working on the BASH hackerrank IDE and although this code is not directly related to the problem in this link, I am getting this error.