1 | echo $#<array>[@] |
2 | |
3 | # или если совсем правильно |
4 | |
5 | echo ${#arrayname[@]} |
example.sh
· 83 B · Bash
Eredeti
--> ARRAY=("one" "two" "three")
--> echo $ARRAY
one two three
--> echo $#ARRAY[@]
3
1 | --> ARRAY=("one" "two" "three") |
2 | --> echo $ARRAY |
3 | one two three |
4 | --> echo $#ARRAY[@] |
5 | 3 |