From da7d78cd0ad03d2469294b065b8d7e561d9fd709 Mon Sep 17 00:00:00 2001 From: mattmcw Date: Mon, 29 Nov 2021 11:35:13 -0500 Subject: [PATCH] Initial loop is failing? --- draw.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/draw.sh b/draw.sh index 9fd9308..9293fe1 100644 --- a/draw.sh +++ b/draw.sh @@ -29,7 +29,8 @@ if [[ "${2}" == "" ]] || [[ $2 -eq 0 ]]; then else c=0 for svg in "${1}"*.svg ; do - if [[ ${c} -ne ${2} ]]; then + if [[ ${c} -lt ${2} ]]; then + echo $c let "c=c+1" continue fi @@ -43,7 +44,7 @@ fi i=0 #files in dir for svg in "${1}"*.svg ; do - if [ "${2}" != "" ] && [ "${i}" != "${2}" ]; then + if [[ "${2}" != "" ]] && [[ ${i} -lt ${2} ]]; then let "i=i+1" continue fi