From d603cd0c67c039c9f0f8f80ae25396ae9b45c29b Mon Sep 17 00:00:00 2001 From: amelia Date: Wed, 30 Aug 2023 23:27:59 -0500 Subject: [PATCH] add quotes --- deck.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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