diff --git a/deck.sh b/deck.sh index fa87564..7e949cc 100755 --- a/deck.sh +++ b/deck.sh @@ -73,15 +73,15 @@ clrline() { relamove() { # relamove 1 -2 = move right 1 and down 2 - if [ $2 -gt 0 ]; then + if [ "$2" -gt 0 ]; then printf "\033["$2"A" - elif [ $2 -lt 0 ]; then + elif [ "$2" -lt 0 ]; then invert=$(echo $2 | cut -d'-' -f 2) printf "\033["$invert"B" fi - if [ $1 -gt 0 ]; then + if [ "$1" -gt 0 ]; then printf "\033["$1"C" - elif [ $1 -lt 0 ]; then + elif [ "$1" -lt 0 ]; then invert=$(echo $1 | cut -d'-' -f 2) printf "\033["$invert"D" fi