diff --git a/BASH-TRANSLATION-EXAMPLES.md b/BASH-TRANSLATION-EXAMPLES.md index c7f1ef5..d5af02e 100644 --- a/BASH-TRANSLATION-EXAMPLES.md +++ b/BASH-TRANSLATION-EXAMPLES.md @@ -131,27 +131,16 @@ POSIX-arrays: `set_a_arr_el test_arr key="test value"` ## -Bash: `echo "value for 'key': '${test_arr[key]}'"` - -POSIX-arrays: `get_a_arr_val test_arr value; echo "value for 'key': '$value'"` - -## - Bash: `unset test_arr[key]` POSIX-arrays: `unset_a_arr_el test_arr key` ## -Bash: `echo "test_arr has '${#test_arr[@]}' elements"` - -POSIX-arrays: `get_a_arr_el_cnt test_arr el_cnt; echo "test_arr has '$el_cnt' elements"` - -## +### Getting values, keys and parameters -### Unsetting arrays -Bash: `unset temp_arr` +Bash: `echo "value for 'key': '${test_arr[key]}'"` -POSIX-arrays: `unset_i_arr temp_arr` +POSIX-arrays: `get_a_arr_val test_arr value; echo "value for 'key': '$value'"` ## @@ -171,6 +160,11 @@ Bash: `echo "test_arr has '${#test_arr[@]}' elements"` POSIX-arrays: `get_a_arr_el_cnt test_arr el_cnt; echo "test_arr has '$el_cnt' elements"` +### Unsetting arrays +Bash: `unset temp_arr` + +POSIX-arrays: `unset_i_arr temp_arr` + ### Working with loops Bash: