eg in ur puroose u dont need source and in ur code when u understood | othercmd is in another subshell , u see it doesnt well if u pipe to tee , .. well the scope of needed
1st source cmd , no extra cmds 2. { . foo ; code ; code ; } | tee 3rd tee < <( . foo ; cmds ) On Wed, Nov 13, 2024, 11:45 PM #!microsuxx <fxmb...@gmail.com> wrote: > depending on actual purpose instead bs demo code , there are serval > approaches to code running code > > On Wed, Nov 13, 2024, 11:13 PM Yuri <y...@rawbw.com> wrote: > >> On 11/13/24 14:02, Greg Wooledge wrote: >> > The commands within a pipeline are executed in subshells (child >> > processes), so all variable changes are discarded when the subshell >> exits. >> >> >> This sounds like an implementation detail that should be invisible that >> affects how the 'source' feature works. >> This makes it a very confusing from the user's perspective. >> >> >> >> >> Yuri >> >> >> >>