bash arrays: keys (indices) and values

This is a wiki page. Be bold and improve it!

If you have any questions about the content on this page, don't hesitate to open a new ticket and we'll do our best to assist you.

List all the elements in an array:

List all the keys (indices) in an array:

Find if an index/key exist

if test "${my_array['key']+isset}"
        echo "The key exists."
        echo "The key does not exist."