On 10/31/13, 11:46 AM, Michael Haubenwallner wrote: > When /dev/fd is missing, and named pipes are used instead (like on AIX), > this snippet sometimes does work right, wrong, or hang - depending on > the operating system's process scheduler timing: > > for x in {0..9}; do echo $x; done > >( > cnt=0; while read line; do let cnt=cnt+1; done; echo $cnt > )
Thanks for the report and fix. This is a long-standing problem, since the code has been like this for at least three years (as far back as I looked). Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/