To define:
- a list (an array): declare -a list
- a dictionary (an associative array): declare -A dict
Now the best, at least for scripts testing:
To print a whole array: declare -p list (please note, no "$" before list name).
Found at https://www.tutorialkart.com/bash-shell-scripting/bash-array/
No comments:
Post a Comment