for loop - BASH: iterate over a list of floating numbers in decrement -
what want similar python codes beneath, while variables start, end, , spacing float numbers , start > end.
for in numpy.arange(start, stop, step): print
or,
for in numpy.linspace(start, stop, num): print
i know awk handy (see second answer in question).
num=$(awk "begin{for(i=${start};i>=${stop};i-=${step})print i}") n in $num $n done
but, how realize iteration on list of floating numbers in decrement in bash without using awk?
thanks !
you may use seq
seq [option]... first increment last
Comments
Post a Comment