Scott M. Mcdermott

UNIX Systems & Network Administrator
available for contract or salaried positions

array_count

#

#
# determines the count of indices for the given array $1,
# useful for when we don't know the array name yet
#
array_count ()
{
    local array=$1

    eval printf \${#${array}\[@\]}
}
# vim:syn=sh:ft=sh