4 ms·
> or maybe enclosing the statement in braces (something like: {foo=bar; echo $foo}...) to delimit temporary assignments As long as you don't need to get anythi
by Izkata 3y ago
> or maybe enclosing the statement in braces (something like: {foo=bar; echo $foo}...) to delimit temporary assignments
As long as you don't need to get anything out of it, it's a bit heavy but dropping to a subshell works like that:
$ (foo=bar; echo $foo)
bar
$ echo $foo