From 0cf2a1eb3382a6384b61a6edd577d387b9b62766 Mon Sep 17 00:00:00 2001 From: David Frascone Date: Fri, 5 Nov 2010 09:34:42 -0600 Subject: [PATCH] Fixed negative indices in the seq command --- seq.in | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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