I’m trying to compare the counter in my for loop in the if statement. I want it to print the contents of the counter when it is equal to 35. Somehow I am making a syntax error, in the line with the if statement. Any help would be greatly appreciated. Also, is variable “counter” an integer, if not what is it?
Thanks!
—begin code—
#!/bin/bash
for counter in {1…40}
do
if [$counter -eq “35”]
then
echo $counter
fi
done