~/ learn/ comp-325/ cards/ export, read, and the child environment
1 of 9

The export cascade, from the parent side

The export cascade, from the parent side

Answer

X=1 export X echo "outer before: $X" sh inner echo "outer after: $X"

Both echo lines print 1, however hard the child works to change it. Delete line 2 and the child sees the null string instead, because nothing was placed in the environment for it to inherit.

S&K 3e ch12 §12.3.3–12.3.6

space flip · ← → navigate · esc to exit
NORMAL ~/memra/library/e76bd209-307b-40da-a2dd-90a12df33763/flashcard utf-8 LF