LittleGreenCat revised this gist 7 months ago. Go to revision
2 files changed, 10 insertions
array.sh(file created)
| @@ -0,0 +1,5 @@ | |||
| 1 | + | echo $#<array>[@] | |
| 2 | + | ||
| 3 | + | # или если совсем правильно | |
| 4 | + | ||
| 5 | + | echo ${#arrayname[@]} | |
example.sh(file created)
| @@ -0,0 +1,5 @@ | |||
| 1 | + | --> ARRAY=("one" "two" "three") | |
| 2 | + | --> echo $ARRAY | |
| 3 | + | one two three | |
| 4 | + | --> echo $#ARRAY[@] | |
| 5 | + | 3 | |
Newer
Older