File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5657,8 +5657,11 @@ extract() {
56575657 return 1
56585658 fi
56595659
5660+ # BSD sed needs an actual newline character in the substitute command
5661+ new_line='
5662+ '
56605663 # Convert " -" to "\n" if not between quotes and remove possible leading white spaces
5661- string=$( echo " $* " | $SED -e ' s: -:\n:g ' -e ' s:"\(.*\)\n\(.*\)":\"\1 -\2":g' -e " s:'\(.*\)\n\(.*\)':\'\1 -\2':g" -e ' s/^[:space:]*//' )
5664+ string=$( echo " $* " | $SED -e " s: -:\\ ${new_line} :g " -e ' s:"\(.*\)\n\(.*\)":\"\1 -\2":g' -e " s:'\(.*\)\n\(.*\)':\'\1 -\2':g" -e ' s/^[:space:]*//' )
56625665 SAVEIFS=$IFS
56635666 IFS=$( printf " \n\b" )
56645667 for i in $string ; do
Original file line number Diff line number Diff line change @@ -222,8 +222,11 @@ extract() {
222222 return 1
223223 fi
224224
225+ # BSD sed needs an actual newline character in the substitute command
226+ new_line='
227+ '
225228 # Convert " -" to "\n" if not between quotes and remove possible leading white spaces
226- string=$(echo " $*" | $SED -e ' s: -:\n:g' -e 's:"\(.*\)\n\(.*\)":\"\1 -\2":g' -e "s:'\(.*\)\n\(.*\)':\'\1 -\2':g" -e 's/^[ [ :space:] ] *//')
229+ string=$(echo " $*" | $SED -e " s: -:\\${new_line}:g" -e 's:"\(.*\)\n\(.*\)":\"\1 -\2":g' -e "s:'\(.*\)\n\(.*\)':\'\1 -\2':g" -e 's/^[ [ :space:] ] *//')
227230 SAVEIFS=$IFS
228231 IFS=$(printf "\n\b")
229232 for i in $string; do
You can’t perform that action at this time.
0 commit comments