madrobot/bash-script-generator

Mutliple Options not converted into an array

Opened this issue · 0 comments

When doing this:

./script.sh -p /home/test -p /home/123 -d 21g -d 44g

I have this output:

0	/home/ test /home/ 123

I use this code to iterate over the array:

for i in "${!OPTS_PATH[@]}"; do 
        printf "%s\t%s\n" "$i" "${OPTS_PATH[$i]}"
done