How to find the length of an array in shell? November 19, 2022 by Tarik $ a=(1 2 3 4) $ echo ${#a[@]} 4