diff --git a/seq.in b/seq.in index 47409484b..b9e82c09f 100755 --- a/seq.in +++ b/seq.in @@ -45,4 +45,8 @@ for i in $from $step $to end end -echo "for( i=$from; i<=$to ; i+=$step ) i;" | bc +if [ $step -ge 0 ] + echo "for( i=$from; i<=$to ; i+=$step ) i;" | bc +else + echo "for( i=$from; i>=$to ; i+=$step ) i;" | bc +end