[Solved] bash print 10 odd numbers then 10 even numbers [closed]


A simple example:

echo {1..19..2}; echo {2..20..2}; echo {21..39..2}; echo {22..40..2}

In a loop:

#!/bin/bash
i=1
while [ "$i" -lt 4000 ]; do
    for j in $i $((i+1)); do
        printf '%s ' $( seq $j 2 $((j+18)) ); echo
    done
    i=$((i+20))
done

2

solved bash print 10 odd numbers then 10 even numbers [closed]