Skip to content

Mutliple Options not converted into an array #3

Open
@TheDeadCode

Description

@TheDeadCode

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions