Remove str variable

This commit is contained in:
Santiago Lo Coco 2022-01-29 13:24:05 -03:00
parent 4b498f0eb7
commit b5718a4e4b
1 changed files with 2 additions and 2 deletions

View File

@ -353,7 +353,7 @@ calcAndRun() {
} }
calcWidth() { calcWidth() {
str=$1; count=1; found=false; option=1 count=1; found=false; option=1
while IFS= read -r -N 1 c; do while IFS= read -r -N 1 c; do
if [[ "$c" == $'\n' ]]; then if [[ "$c" == $'\n' ]]; then
[ $count -ge $option ] && option=$count [ $count -ge $option ] && option=$count
@ -361,7 +361,7 @@ calcWidth() {
count=-1 count=-1
fi fi
((count++)) ((count++))
done < <(echo -ne "$str") done < <(echo -ne "$1")
[ $option -ge $count ] && count=option [ $option -ge $count ] && count=option
echo $((count+4)) echo $((count+4))
} }