Code:
${#parameter}
Parameter length. The length in characters of the value of parameter is substituted. If param‐
eter is * or @, the value substituted is the number of positional parameters. If parameter is
an array name subscripted by * or @, the value substituted is the number of elements in the
array. If parameter is an indexed array name subscripted by a negative number, that number is
interpreted as relative to one greater than the maximum index of parameter, so negative indices
count back from the end of the array, and an index of -1 references the last element.