Fixed negative indices in the seq command

This commit is contained in:
David Frascone 2010-11-05 09:34:42 -06:00
parent 8a46a8ecb2
commit 0cf2a1eb33

6
seq.in
View file

@ -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