#!/bin/bash i=0 j=0 while [ $i -le 100 ] do if [ $i -lt $j ] then i=$(($i+4)) else i=$(($i+3)) fi j=$(( $j+3 )) if [ $i -eq $j ] then echo $i fi done