From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24158 invoked from network); 17 Aug 2004 03:08:47 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 17 Aug 2004 03:08:47 -0000 Received: (qmail 73886 invoked from network); 17 Aug 2004 03:08:41 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 17 Aug 2004 03:08:41 -0000 Received: (qmail 19245 invoked by alias); 17 Aug 2004 03:07:56 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7870 Received: (qmail 19235 invoked from network); 17 Aug 2004 03:07:55 -0000 Received: from unknown (HELO a.mx.sunsite.dk) (130.225.247.88) by 130.225.247.90 with SMTP; 17 Aug 2004 03:07:55 -0000 Received: (qmail 72443 invoked from network); 17 Aug 2004 03:06:36 -0000 Received: from unknown (HELO moonbase.zanshin.com) (167.160.213.139) by a.mx.sunsite.dk with SMTP; 17 Aug 2004 03:06:34 -0000 Received: from toltec.zanshin.com (toltec.zanshin.com [64.84.47.166]) by moonbase.zanshin.com (8.12.11/8.12.11) with ESMTP id i7H36W71008680 for ; Mon, 16 Aug 2004 20:06:32 -0700 Date: Mon, 16 Aug 2004 20:06:32 -0700 (PDT) From: Bart Schaefer Reply-To: Bart Schaefer To: zsh-users@sunsite.dk Subject: Re: Slightly OT: Error-Handling in a Pipeline, preferably non-zsh In-Reply-To: <20040816145346.GC5185@DervishD> Message-ID: References: <6D7144FA-EF81-11D8-83BE-000502631FBD@louisville.edu> <20040816145346.GC5185@DervishD> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="1413522991-437096168-1092671825=:21654" Content-ID: X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=-0.0 required=6.0 tests=BAYES_44 autolearn=no version=2.63 X-Spam-Hits: -0.0 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --1413522991-437096168-1092671825=:21654 Content-Type: TEXT/PLAIN; CHARSET=iso-8859-1 Content-Transfer-Encoding: 8BIT Content-ID: Sigh. Someday maybe I'll decide not to answer email in the middle of the night when I've been taking decongestants. On Mon, 16 Aug 2004, Aaron Davies wrote: > On Monday, August 16, 2004, at 03:41 AM, Bart Schaefer wrote: > > > What happens when one of the arguments of the command is a quoted word > > containing spaces? [...] > > sleep 30 & > > runcommandonpidof sleep print -l "this should be on one line" > > > > (and try it in a non-zsh shell, where word splitting applies; no > > cheating by letting zsh preserve the quoting for you, you asked for > > portability). > > What is "print"? As has been pointed out by Raśl, I've been telling you to avoid zsh while giving an example that uses a zsh builtin. > toall sleep echo "this is one line" > > produces > > this is one line 19980 > > whether or not $@ is in quotes. Try this one: toall sleep echo "this has ten spaces" With $@, you should get this has ten spaces 19980 Whereas "$@" should give this has ten spaces 19980 On Mon, 16 Aug 2004, Aaron Davies wrote: > I'm running this under Bourne sh, as I mentioned in my original request. And I should have remembered, as Dan Nelson mentioned, that $pipestatus is only available in bash and zsh and therefore not portable. --1413522991-437096168-1092671825=:21654--