On 2024-04-05 13:32, Bart Schaefer wrote:
It was a few years ago. I'd plum forgotten to the point where I was mystified when the above happened because I've not thought about it since. But I do remember that Roman was running all sorts of interesting speed tests. I wish we could search the archives, I'd go looking for it. I do remember making a typical comment to the effect that there's nothing intuitive about this subshell business but it turns out that there are deep reasons for it just the same.On Wed, Apr 3, 2024 at 11:49 AM Ray Andrews <rayandrews@xxxxxxxxxxx> wrote:I believe Bart had a solution to that.I can't think what you're referring to, but in the realm of the baroque ...
func | ...... I sorta expect func to do whatever it does, even if the *output* is piped into a subshell. In the above, I'm expecting my variable to be modified, pipe or no pipe since the intention of the pipe would seem to be to modify the output and -- I might have thought -- that's all.
typeset -gi Pnum alias -g '|'='> ${TMPPREFIX}pipe$$.$((++Pnum)) ; < ${TMPPREFIX}pipe$$.$((Pnum))'
Not for thumb-suckers like myself!