Expands into the expression:
${#ARRAYNAME[@]}
evaluating to the number of pairs in the array variable ARRAYNAME.
Expand to a “list” of array values, respectively:
mbfl_slots_values(ARRAYNAME) → ${ARRAYNAME[@]} mbfl_slots_qvalues(ARRAYNAME) → "${ARRAYNAME[@]}"
Expand to a “list” of array keys, respectively:
mbfl_slots_keys(ARRAYNAME) → ${!ARRAYNAME[@]} mbfl_slots_qkeys(ARRAYNAME) → "${!ARRAYNAME[@]}"
Return successfully if the array is empty.
declare -a ARRY mbfl_array_is_empty ARRY ⇒ 0 ARRY=(a b c) mbfl_array_is_empty ARRY ⇒ 1
Return successfully if the array is not empty.
declare -a ARRY mbfl_array_is_not_empty ARRY ⇒ 1 ARRY=(a b c) mbfl_array_is_not_empty ARRY ⇒ 0
Print the number of pairs in the array.
The function variant _var
stores the result in the variable _RV, rather than print it;
Result variables.
declare -a ARRY mbfl_array_length ARRY -| 0 ARRY=(a b c) mbfl_array_length ARRY -| 3 local _RV mbfl_array_length_var _RV ARRY "$_RV" -| 3
This document describes version 3.0.0-devel.9 of Marcos Bash Functions Library.