I want to print odd numbers in alpine:3.13 image. I'm getting the error, line 4: arithmetic syntax error. However, this works fine in linux. How can I fix this? Thanks!
for i in {1..10}
do
if [ $(( $i % 2 )) != 0 ]
then
echo "$i"
fi
done
When I change the first line with this for i in 1 2 3 4. It works fine but I need to give a range. Any help would be appreciated