1
1
mirror of https://github.com/namibia/awesome-cheatsheets.git synced 2024-11-21 12:25:14 +00:00

Merge pull request #21 from 59023g/patch-1

BUG: bash.sh: array(val val val) -> array=(val val val)
This commit is contained in:
Julien Le Coupanec 2018-02-11 19:35:32 +01:00 committed by GitHub
commit 23877a3c82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -147,7 +147,7 @@ array[0]=val # several ways to define an array
array[1]=val
array[2]=val
array=([2]=val [0]=val [1]=val)
array(val val val)
array=(val val val)
${array[i]} # displays array's value for this index. If no index is supplied, array element 0 is assumed
${#array[i]} # to find out the length of any element in the array