From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-users@sunsite.dk
Subject: Re: Slightly OT: Error-Handling in a Pipeline, preferably non-zsh
Date: Mon, 16 Aug 2004 20:06:32 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.61.0408160856520.21654@toltec.zanshin.com> (raw)
In-Reply-To: <20040816145346.GC5185@DervishD>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1275 bytes --]
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.
next prev parent reply other threads:[~2004-08-17 3:08 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-16 1:04 Aaron Davies
2004-08-16 2:42 ` Bart Schaefer
2004-08-16 3:33 ` Aaron Davies
2004-08-16 7:41 ` Bart Schaefer
2004-08-16 12:40 ` Aaron Davies
2004-08-16 14:53 ` DervishD
2004-08-17 3:06 ` Bart Schaefer [this message]
2004-08-16 3:03 ` Philippe Troin
2004-08-16 3:30 ` Aaron Davies
2004-08-16 7:51 ` Bart Schaefer
2004-08-16 12:41 ` Aaron Davies
2004-08-16 16:08 ` Dan Nelson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.61.0408160856520.21654@toltec.zanshin.com \
--to=schaefer@brasslantern.com \
--cc=zsh-users@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).