Meta
Categories
Category Archives: shell
Bash Array
Assign Array Elements # Assign array elements echo myArr[0]=’one’ myArr[1]=’two’ myArr[10]=’ten’ # Access array elements. *Curly brackets* are important. echo "\${myArr[0]}: ${myArr[0]}" # ${myArr[0]}: one. # Echo all elements echo "\${myArr[@]}: ${myArr[@]}" # ${myArr[@]}: one two ten # Initialize … Continue reading
Posted in shell
Comments Off on Bash Array