How to export an associative array (hash) in bash?

后端 未结 3 1724
梦毁少年i
梦毁少年i 2020-12-16 16:27

Related, but not a duplicate of: How to define hash tables in Bash?

I can define and use a bash hash, but I am unable to export it, even with the -x flag. For examp

3条回答
  •  时光取名叫无心
    2020-12-16 16:38

    There isn't really a good way to encode an array variable into the environment. See http://www.mail-archive.com/bug-bash@gnu.org/msg01774.html (Chet Ramey is the maintainer of bash)

提交回复
热议问题