Get number of elements in an array
Gets the number of elements in an array, and prints it to stdout.
Authored by: Wyatt-StankeBrought to you by Warp, a free terminal reimagined to work like a modern app.
array_name
Command
Copy
echo ${#array_name[@]}
Tags
Edit in GitHub
Copied