zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Peter Stephenson <pws@pwstephenson.fsnet.co.uk>, zsh-users@sunsite.dk
Subject: Re: Zsh Guide chapter 5 (substitutions)
Date: Thu, 16 Aug 2001 02:31:50 +0000	[thread overview]
Message-ID: <1010816023151.ZM11189@candle.brasslantern.com> (raw)
In-Reply-To: <20010815230024.3E7F614284@pwstephenson.fsnet.co.uk>

On Aug 16, 12:00am, Peter Stephenson wrote:
} Subject: Zsh Guide chapter 5 (substitutions)
}
} The main addition is chapter 5, which talks about all forms of shell
} substitutions and expansions.  Chapter 3 has been slightly edited.  I'd
} be interested in any comments on either, of course.  It's possible
} chapter 3 is a little indigestible and I could move some of the
} marginalia to a later chapter or appendices or whatever.

Here's something I noticed in Chapter 3:

---------------
  ./myscript 2> >(grep -v idiot >error.log) |
       process-output >output.log


a little abstract, but here the main point of the script `myscript'
is to produce some output which undergoes further processing on the
right-hand side of the pipe. However, we want to process the error
output here, by filtering out occurrences of lines which use the word
`idiot', before dumping those errors into a file error.log. So we get an
effect similar to having two pipelines at once, one for output and one
for error. Note again the two `>' signs present next to one another to
get that effect. Don't remove the space between them, either: for what
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
that will do, and for more on the meaning of `2>', see the section on
redirections, below.
---------------

I don't know what you're driving at, there.  2>>(thing) and 2> >(thing)
are exactly equivalent.  However, 2>(thing) is the same as 2 >(thing),
and not the same as 2> (thing), which is a syntax error that I've never
seen before in ten years of using zsh ("missing end of name").

I may have some remarks about chapter 5 when I get there ...

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


  reply	other threads:[~2001-08-16  2:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-15 23:00 Peter Stephenson
2001-08-16  2:31 ` Bart Schaefer [this message]
2001-08-17 16:55 ` Bart Schaefer
2001-08-20 18:26 ` Bart Schaefer
2001-08-20 18:35   ` Phil Pennock
2001-08-21 16:38   ` Bart Schaefer
2001-08-21 14:21 ` Richard Curnow
2001-08-21 15:34   ` Bart Schaefer
2001-08-22 17:10 martin.ebourne
2001-08-23  7:30 ` Borsenkow Andrej
2001-08-23  7:41   ` Borsenkow Andrej

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=1010816023151.ZM11189@candle.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=pws@pwstephenson.fsnet.co.uk \
    --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).