Horje
access array elements bash script Code Example
bash access array indirectly
#!/usr/bin/env bash

ARRAYNAME='FRUITS'
FRUITS=( APPLE BANANA ORANGE )

eval array=\( \${${ARRAYNAME}[@]} \)

for fruit in "${array[@]}"; do
  echo ${fruit}
done
access array elements bash script
#In case you want to access an element just use an index
$array[0]
$array[1]
.....




Shell

Related
infura Code Example infura Code Example
Unable to save the cache config to file in moodle Code Example Unable to save the cache config to file in moodle Code Example
git pasar de https a ssh Code Example git pasar de https a ssh Code Example
linux capitalize string using tr Code Example linux capitalize string using tr Code Example
ssh tunel map background Code Example ssh tunel map background Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
16