I'm trying to assign an array of three values to a variable if it hasn't been assigned yet with the line
: ${SEAFILE_MYSQL_DB_NAMES:=(ccnet-db seafile-db seahub-db)}
Unfortunately, echoing ${SEAFILE_MYSQL_DB_NAMES[@]}
results in (ccnet-db seafile-db seahub-db)
and ${SEAFILE_MYSQL_DB_NAMES[2]}
prints nothing. It seems, the value has been interpreted as a string and not as an array. Is there any way I can make my script assign an array this way?