From owner-freebsd-current@FreeBSD.ORG Tue Jun 24 21:44:07 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A487937B401 for ; Tue, 24 Jun 2003 21:44:07 -0700 (PDT) Received: from mail.cyberonic.com (mail.cyberonic.com [4.17.179.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id B81FF43FE1 for ; Tue, 24 Jun 2003 21:44:06 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (node-40244c0a.sfo.onnet.us.uu.net [64.36.76.10]) by mail.cyberonic.com (8.12.8/8.12.5) with ESMTP id h5P4iQMo009276; Wed, 25 Jun 2003 00:44:27 -0400 Received: (from jmg@localhost) by hydrogen.funkthat.com (8.12.9/8.11.6) id h5P4hurg018981; Tue, 24 Jun 2003 21:43:56 -0700 (PDT) (envelope-from jmg) Date: Tue, 24 Jun 2003 21:43:56 -0700 From: John-Mark Gurney To: Tim Kientzle Message-ID: <20030625044356.GW57612@funkthat.com> Mail-Followup-To: Tim Kientzle , Artem 'Zazoobr' Ignatjev , freebsd-current@freebsd.org References: <20030624183515.A42570@FreeBSD.org> <1056499632.662.7.camel@timon.nist> <3EF922BE.4070803@acm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3EF922BE.4070803@acm.org> User-Agent: Mutt/1.4.1i X-Operating-System: FreeBSD 4.2-RELEASE i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html cc: freebsd-current@freebsd.org cc: Artem 'Zazoobr' Ignatjev Subject: Re: tcsh being dodgy, or pipe code ishoos? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: John-Mark Gurney List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jun 2003 04:44:07 -0000 Tim Kientzle wrote this message on Tue, Jun 24, 2003 at 21:19 -0700: > 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. Yes, but the default xargs w/ -n is only one concurrently, which would mean that tcsh is returning a valid return value before it writes. I have gotten the 3 to appear before the 2. > ( ( echo 2 ; echo 3 ) | xargs -I% /bin/echo + % ) + 3 + 2 (btw, I can see this on sparc w/ tcsh, not bash or sh) -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."