summaryrefslogtreecommitdiffstats
path: root/debian/patches/bash-aliases-repeat.diff
blob: e80547355c52f3efd5bc742e4fdba790099ba2ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# DP: Fix bug in Bash_aliases example.

--- a/examples/startup-files/Bash_aliases
+++ b/examples/startup-files/Bash_aliases
@@ -41,20 +41,20 @@
 { 
     local count="$1" i;
     shift;
-    for i in $(seq 1 "$count");
+    for i in $(_seq 1 "$count");
     do
         eval "$@";
     done
 }
 
 # Subfunction needed by `repeat'.
-seq ()
+_seq ()
 { 
     local lower upper output;
     lower=$1 upper=$2;
 
     if [ $lower -ge $upper ]; then return; fi
-    while [ $lower -le $upper ];
+    while [ $lower -lt $upper ];
     do
 	echo -n "$lower "
         lower=$(($lower + 1))