[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
temp env vs export
From: |
Grisha Levit |
Subject: |
temp env vs export |
Date: |
Thu, 22 Jun 2023 13:54:40 -0400 |
Using `export' / `readonly' on a variable that's present in both the temp
env and a calling function's local context combines the attributes of all
the intervening scopes in the global variable:
$ declare -A v; f() { local -a v; v= e; }; e() { export v; }
$ (f; declare -p v)
declare -aAx v=([0]="")
$ (f; v=)
Segmentation fault: 11
- temp env vs export,
Grisha Levit <=