Bash Loop add more to loops

i tried doing while as well, but it doesn’t seem to work with centos version 7. can someone please tell me what i’m doing wrong? I’m just trying to add one back to the loop if it does not meet my greater than logic. Any kind of help I can get on this is greatly appreciated!

clips=200
for (( i=0 ; i<clips ; i++ ))
if(("$cutlength">8)); then
echo "good"
else 
echo "redo, adding one back to loop"
i=$(($i-1))
fi


Source: bash

Leave a Reply