I know how to do sequential for loops like:
for i in $(seq 0 63)
do
echo $i
done
This would print 0-63 . But what if I wanted certain numbers looped like only 0, 5, 25, 43, 44, 51, 54.
I know I could do the following:
for i in $(seq 0 63)
do
if [ "$i" -eq 0 ] || [ "$i" -eq 5 ] || [ "$i" -eq 25 ] || [ "$i" -eq 43 ] || [ "$i" -eq 44 ] || [ "$i" -eq 51 ] || [ "$i" -eq 54 ]; then
echo $i
fi
done
But the result will be that it still goes through those loop iterations, and is not an efficient solution.
Is there something I can use with seq to describe these certain numbers 0,5,25,43,44,51,54?