From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12618 invoked from network); 16 Aug 2001 02:32:16 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 16 Aug 2001 02:32:16 -0000 Received: (qmail 13813 invoked by alias); 16 Aug 2001 02:32:00 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 4128 Received: (qmail 13798 invoked from network); 16 Aug 2001 02:31:59 -0000 From: Bart Schaefer Message-Id: <1010816023151.ZM11189@candle.brasslantern.com> Date: Thu, 16 Aug 2001 02:31:50 +0000 In-Reply-To: <20010815230024.3E7F614284@pwstephenson.fsnet.co.uk> Comments: In reply to Peter Stephenson "Zsh Guide chapter 5 (substitutions)" (Aug 16, 12:00am) References: <20010815230024.3E7F614284@pwstephenson.fsnet.co.uk> X-Mailer: Z-Mail (5.0.0 30July97) To: Peter Stephenson , zsh-users@sunsite.dk Subject: Re: Zsh Guide chapter 5 (substitutions) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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