Remove str variable
This commit is contained in:
parent
4b498f0eb7
commit
b5718a4e4b
|
@ -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))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue