bug-bash
[Top][All Lists]
Advanced

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

Re: Why `echo -n hello | while read v; do echo $v; done' prints nothing?


From: Eric Blake
Subject: Re: Why `echo -n hello | while read v; do echo $v; done' prints nothing?
Date: Thu, 02 Dec 2010 09:29:29 -0700
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101103 Fedora/1.0-0.33.b2pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.6

On 12/02/2010 04:04 AM, Clark J. Wang wrote:
> Following command also prints nothing, confused :(
> 
> for ((i = 0; i < 10; ++i)); do echo -n " $i"; done | while read v; do echo
> $v; done

http://www.faqs.org/faqs/unix-faq/shell/bash/
FAQ E4.

-- 
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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