Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Jun 2003 21:19:10 -0700
From:      Tim Kientzle <kientzle@acm.org>
To:        "Artem 'Zazoobr' Ignatjev" <timon@memphis.mephi.ru>
Cc:        freebsd-current@freebsd.org
Subject:   Re: tcsh being dodgy, or pipe code ishoos?
Message-ID:  <3EF922BE.4070803@acm.org>
References:  <20030624183515.A42570@FreeBSD.org> <1056499632.662.7.camel@timon.nist>

next in thread | previous in thread | raw e-mail | index | archive | help
Artem 'Zazoobr' Ignatjev wrote:
> Juli Mallett wrote:
> 
>>Anyone with insight into this?
>>
>>(jmallett@big-lizard:~)39% ( echo 1 ; ( ( echo 2 ; echo 3 ) | xargs -I% echo + % ) )
>>1
>>+ 2
>>+ 3
>>(jmallett@big-lizard:~)40% ( echo 1 ; ( ( echo 2 ; echo 3 ) | xargs -I% echo + % ) ) | cat
>>1
>>+ +2
>>3
> 
> last cat is not necessary...
> And it's more weird than that:
> 
>>( echo 1 ; ( ( echo 2 ; echo 3 ) | xargs -I% echo -- + % ) )
> 
> 1
> -- --+  +2 
> 3
> 


Hmmm... This looks like xargs isn't waiting for the subcommand
to exit.  This looks like 'echo -- + 2' and 'echo -- + 3' are
running concurrently.

Tim




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3EF922BE.4070803>