Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #declare -A arr
- # Formato array 2 dimensiones
- # asginar un elemento a una posicion
- # arr[indiceFila,indiceColumna]=valor
- echo "Array de dos dimensiones
- "
- echo " 0 1"
- echo "0 a b"
- echo "1 c d"
- echo "
- declare -A alpha=([0,0]=a [0,1]=b [1,0]=c [1,1]=d)"
- declare -A alpha=([0,0]=a [0,1]=b [1,0]=c [1,1]=d)
- echo "echo \${alpha[0,1]}
- "
- echo ${alpha[0,1]}
- echo "
- echo \${alpha[1,0]}"
- echo ${alpha[1,0]}
- echo "
- echo \${alpha[1,1]}"
- echo ${alpha[1,1]}
- echo "
- echo \${alpha[@]}"
- echo "${alpha[@]}"
- echo "alpha[1,1]=D"
- alpha[1,1]=D
- echo "
- echo \${alpha[1,1]}"
- echo ${alpha[1,1]}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement