bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SH bahaviour to not fork a subshell after " | while read "


From: Greg Wooledge
Subject: Re: SH bahaviour to not fork a subshell after " | while read "
Date: Fri, 1 Jun 2012 08:04:35 -0400
User-agent: Mutt/1.4.2.3i

On Fri, Jun 01, 2012 at 10:53:22AM +0200, freD wrote:
> bash-3.00# T=toto ; du | while read a ; do   T=$a ; done ; echo $T
> toto

http://mywiki.wooledge.org/BashFAQ/024

Quick answer:     while read ... done < <(some command)
Portable version: mkfifo fifo; some command > fifo & ...



reply via email to

[Prev in Thread] Current Thread [Next in Thread]