Fix word splitting bug in calcRun()

This commit is contained in:
Santiago Lo Coco 2022-01-29 15:57:05 -03:00
parent f757185f57
commit 30992a303c
1 changed files with 1 additions and 1 deletions

View File

@ -342,7 +342,7 @@ calcAndRun() {
((i++))
done
dim=$($function "$str")
comm="${*//${dimName^^}/$dim}"
comm=$(sed "s/${dimName^^}/$dim/g" <(echo "$@"))
if [[ $comm != *"3>&1 1>&2 2>&3" ]]; then
comm="${comm} 3>&1 1>&2 2>&3"
fi