Re: Weird process substitution behavior

2013-11-16 Thread Chet Ramey
On 11/8/13, 6:26 PM, John Dawson wrote: > The following surprised me. I thought line 4 of the output, and certainly > line 5 of the output, should have said "0 /dev/fd/63" too. Is this behavior > a bug? Bash is pretty aggressive about closing pipe file descriptors (/dev/fd constructs use pipes) op

Re: Weird process substitution behavior

2013-11-15 Thread John Dawson
On Fri, Nov 15, 2013 at 2:35 AM, Michael Haubenwallner < michael.haubenwall...@salomon.at> wrote: > On 11/14/2013 08:56 PM, Chet Ramey wrote: > > On 11/8/13 6:26 PM, John Dawson wrote: > >> The following surprised me. I thought line 4 of the output, and > certainly > >> line 5 of the output, shoul

Re: Weird process substitution behavior

2013-11-15 Thread Michael Haubenwallner
On 11/14/2013 08:56 PM, Chet Ramey wrote: > On 11/8/13 6:26 PM, John Dawson wrote: >> The following surprised me. I thought line 4 of the output, and certainly >> line 5 of the output, should have said "0 /dev/fd/63" too. Is this behavior >> a bug? > > I'm still looking at this. I have not had a

Re: Weird process substitution behavior

2013-11-14 Thread Chet Ramey
On 11/8/13 6:26 PM, John Dawson wrote: > The following surprised me. I thought line 4 of the output, and certainly > line 5 of the output, should have said "0 /dev/fd/63" too. Is this behavior > a bug? I'm still looking at this. I have not had a great deal of time to investigate. Chet -- ``The

Weird process substitution behavior

2013-11-13 Thread John Dawson
The following surprised me. I thought line 4 of the output, and certainly line 5 of the output, should have said "0 /dev/fd/63" too. Is this behavior a bug? $ cat bug1.bash #!/bin/bash count_lines() { wc -l $1 wc -l $1 wc -l $1 true | wc -l $1 wc -l $1 } count_lines <(date) $

Weird process substitution behavior

2013-11-08 Thread John Dawson
The following surprised me. I thought line 4 of the output, and certainly line 5 of the output, should have said "0 /dev/fd/63" too. Is this behavior a bug? $ cat bug1.bash #!/bin/bash count_lines() { wc -l $1 wc -l $1 wc -l $1 true | wc -l $1 wc -l $1 } count_lines <(date) $