0

How to export array??

in a shell script:

id=()
id+=( id id2 id3 )
password=()
password+=( password password2 password3 )

export $id

export $password
Digvijay S
  • 2,665
  • 1
  • 9
  • 21
Pyo
  • 21
  • 2
  • 2
    Does this answer your question? [How to export an associative array (hash) in bash?](https://stackoverflow.com/questions/12944674/how-to-export-an-associative-array-hash-in-bash) – Digvijay S Jun 15 '20 at 11:06
  • https://www.mail-archive.com/bug-bash@gnu.org/msg01774.html – Digvijay S Jun 15 '20 at 11:06
  • 3
    Array or not: The syntax is `export variableName` not `export $variableName` (which is basically `export content of the variable`). – Socowi Jun 15 '20 at 11:23

0 Answers0