diff --git a/draw.sh b/draw.sh index 9293fe1..7449c81 100644 --- a/draw.sh +++ b/draw.sh @@ -31,7 +31,7 @@ else for svg in "${1}"*.svg ; do if [[ ${c} -lt ${2} ]]; then echo $c - let "c=c+1" + c=$((c+1)) continue fi filename=`basename "${svg}"` @@ -44,8 +44,8 @@ fi i=0 #files in dir for svg in "${1}"*.svg ; do - if [[ "${2}" != "" ]] && [[ ${i} -lt ${2} ]]; then - let "i=i+1" + if [[ "${2}" != "" ]] && [[ ${2} -ne 0 ]] && [[ ${i} -lt ${2} ]]; then + i=$((i+1)) continue fi filename=`basename "${svg}"`