make this script slightly smarter. Stop incrementing variable once match is hit.
This commit is contained in:
parent
adc8b899ed
commit
7ef75b47ba
2
loop.sh
2
loop.sh
|
@ -25,8 +25,8 @@ fi
|
||||||
i=0
|
i=0
|
||||||
#files in dir
|
#files in dir
|
||||||
for svg in "${1}"*.svg ; do
|
for svg in "${1}"*.svg ; do
|
||||||
let "i=i+1"
|
|
||||||
if [ "${2}" != "" ] && [ "${i}" != "${2}" ]; then
|
if [ "${2}" != "" ] && [ "${i}" != "${2}" ]; then
|
||||||
|
let "i=i+1"
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
filename=`basename "${svg}"`
|
filename=`basename "${svg}"`
|
||||||
|
|
Loading…
Reference in New Issue