Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Slightly OT: Error-Handling in a Pipeline, preferably non-zsh
- X-seq: zsh-users 7870
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Slightly OT: Error-Handling in a Pipeline, preferably non-zsh
- Date: Mon, 16 Aug 2004 20:06:32 -0700 (PDT)
- In-reply-to: <20040816145346.GC5185@DervishD>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <Pine.LNX.4.61.0408160032060.21654@xxxxxxxxxxxxxxxxxx> <6D7144FA-EF81-11D8-83BE-000502631FBD@xxxxxxxxxxxxxx> <20040816145346.GC5185@DervishD>
- Reply-to: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author