Re: redirection inside a process-substitution

2016-08-29 Thread Stephane Chazelas
2016-08-27 02:35:08 +0200, Helmut Karlowski: [...] > >I speculate that this has to do with something that zsh does to force > >appending, whether that's lseek or something else, other than the fact > >that zsh doesn't seem to use /dev/fd at all (I think it just straight > >uses pipes). Bash doesn'

Re: redirection inside a process-substitution

2016-08-26 Thread Helmut Karlowski
Am 24.08.2016, 18:00 Uhr, schrieb Chet Ramey: echo > >(echo 3 1>&3) echo + cat tb.err echo - wait I get in bash: Strange. I get + 1 - + 11 - + - 2 + 2 3 - on Mac OS X and RHEL 6. I'm not sure why the last redirection (the one with just process subst

Re: redirection inside a process-substitution

2016-08-24 Thread Chet Ramey
On 8/23/16 5:00 PM, Helmut Karlowski wrote: > Now extending Pierre's example: > > exec 3>tb.err > echo 3>&1 > >(echo 1 1>&3) > echo + > cat tb.err > echo - > echo 3>&1 > >(echo 11 1>&3) > echo + > cat tb.err > echo - > echo > >(echo 2 1>&3) 3>&1 > echo + > echo - > cat tb.

Re: redirection inside a process-substitution

2016-08-23 Thread Helmut Karlowski
Am 23.08.2016, 17:00 Uhr, schrieb Chet Ramey: It has to do when things are processed. Process substitution is not a command or a redirection: it is a word expansion that expands to a file name. Word expansions are performed before redirections. Sure: similar to command-substitution as mentio

Re: redirection inside a process-substitution

2016-08-23 Thread Chet Ramey
On 8/22/16 3:38 PM, helmut.karlow...@ish.de wrote: > When doing redirection inside a sub-process to a descriptor that is > redirected to a file the output of the subshell goes into the file. Child processes created to run subshells inherit open file descriptors from their parent. > Now when the s

Re: redirection inside a process-substitution

2016-08-23 Thread Pierre Gaston
On Mon, Aug 22, 2016 at 10:38 PM, wrote: > When doing redirection inside a sub-process to a descriptor that is > redirected to a file the output of the subshell goes into the file. > > Now when the same descriptor is again redirected to another descriptor for > this whole > command-list, the outp

redirection inside a process-substitution

2016-08-22 Thread helmut . karlowski
When doing redirection inside a sub-process to a descriptor that is redirected to a file the output of the subshell goes into the file. Now when the same descriptor is again redirected to another descriptor for this whole command-list, the output of the sub-process goes to the other descriptor.