$ a=(1 2 3 4)
$ echo ${#a[@]}
4
More Related Contents:
- Loop through an array of strings in Bash?
- How to sort an array in Bash
- How to pass array as an argument to a function in Bash
- Arrays in unix shell?
- Reading a space-delimited string into an array in Bash
- Convert command line arguments into an array in Bash
- I am getting error “array.sh: 3: array.sh: Syntax error: “(” unexpected”
- How do I assign ls to an array in Linux Bash?
- Check if an element is present in a Bash array [duplicate]
- Check if a Bash array contains a value
- Creating an array from a text file in Bash
- Reading output of a command into an array in Bash
- How can I store the “find” command results as an array in Bash
- How can I join elements of an array in Bash?
- Passing arrays as parameters in bash
- Iterate over two arrays simultaneously in bash
- Capturing output of find . -print0 into a bash array
- Multi-dimensional arrays in Bash
- Remove an element from a Bash array
- How to pass an associative array as argument to a function in Bash?
- How to return an array in bash without using globals?
- Accessing a JSON object in Bash – associative array / list / another model
- Print array elements on separate lines in Bash?
- Bash indirect array addressing?
- How to check if element exists in array with jq
- Convert multiline string to array [duplicate]
- How to pass an array argument to the Bash script
- How to merge two arrays in a zipper like fashion in Bash?
- Assigning an Array Parsed With jq to Bash Script Array
- Easiest way to check for an index or a key in an array?