Closed szsam closed 8 months ago
For (list) in bash, list is executed in a subshell environment. Variable assignments do not remain in effect after the command completes.
(list)
list
Fix by using { list; }, where list is executed in the current shell environment.
{ list; }
For
(list)
in bash,list
is executed in a subshell environment. Variable assignments do not remain in effect after the command completes.Fix by using
{ list; }
, wherelist
is executed in the current shell environment.