@@ -81,18 +81,18 @@ function parse_end() {
81
81
return 1
82
82
fi
83
83
84
- if (( "${from} " > "${to} ")) ; then
84
+ if [ " ${from} " -gt " ${to} " ] ; then
85
85
echo " arg from can not be greater than arg to" >&2
86
86
return 1
87
87
fi
88
88
89
89
declare -i len_from; let len_from=" ${# from} "
90
90
declare -i len_to; let len_to=" ${# to} "
91
91
92
- if [ ${len_from} -eq 1 ]; then
92
+ if [ " ${len_from} " -eq 1 ]; then
93
93
local result=(${from} ${to} )
94
94
95
- echo ${result[@]} ; return
95
+ echo " ${result[@]} " ; return
96
96
fi
97
97
98
98
local join_from=$( repeat " 0" ${len_from} )
@@ -101,7 +101,7 @@ function parse_end() {
101
101
if [ " ${join_to} " -eq " 9${to: 1} " ]; then
102
102
local result=(${from} ${to} )
103
103
104
- echo ${result[@]} ; return
104
+ echo " ${result[@]} " ; return
105
105
fi
106
106
107
107
if (( "${from: 0: 1} " < "${to: 0: 1} " )) ; then
@@ -117,7 +117,7 @@ function parse_end() {
117
117
local break_point2=$( create_break_point ${e} )
118
118
local result=(${from} ${break_point2} ${injection} )
119
119
120
- echo ${result[@]} ; return
120
+ echo " ${result[@]} " ; return
121
121
fi
122
122
fi
123
123
@@ -138,7 +138,7 @@ function parse_end() {
138
138
local break_point2=$( create_break_point $(( $e + 1 )) )
139
139
local result=(${injection} ${break_point2} ${to} )
140
140
141
- echo ${result[@]} ; return
141
+ echo " ${result[@]} " ; return
142
142
fi
143
143
144
144
if (( "${from: 0: 1} " < "${to: 0: 1} " )) ; then
@@ -161,7 +161,7 @@ function parse_end() {
161
161
fi
162
162
local result=(${injection1} ${injection2} )
163
163
164
- echo ${result[@]} ; return
164
+ echo " ${result[@]} " ; return
165
165
fi
166
166
167
167
local o=$( parse_end " ${from: 1} " " ${to: 1} " )
@@ -314,7 +314,7 @@ function combine() {
314
314
return 1
315
315
fi
316
316
317
- if (( "${from} " > "${to} ")) ; then
317
+ if [ " ${from} " -gt " ${to} " ] ; then
318
318
echo " arg from can not be greater than arg to" >&2
319
319
return 1
320
320
fi
@@ -342,9 +342,9 @@ function combine() {
342
342
done
343
343
344
344
local range=$( parse_into_regex " ${end_range} " )
345
- parse_into_pattern " ${range} " $3 $4 $5
345
+ parse_into_pattern " ${range} " " $3 " " $4 " " $5 "
346
346
}
347
347
348
- if [ ! -z $1 ] && [ ! -z $2 ]; then
349
- combine $1 $2 $3 $4 $5
348
+ if [ -n " $1 " ] && [ -n " $2 " ]; then
349
+ combine " $1 " " $2 " " $3 " " $4 " " $5 "
350
350
fi
0 commit comments