From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21749 invoked from network); 23 Sep 2005 13:25:41 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 23 Sep 2005 13:25:41 -0000 Received: (qmail 34670 invoked from network); 23 Sep 2005 13:25:35 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 23 Sep 2005 13:25:35 -0000 Received: (qmail 3883 invoked by alias); 23 Sep 2005 13:25:31 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 21755 Received: (qmail 3868 invoked from network); 23 Sep 2005 13:25:29 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 23 Sep 2005 13:25:29 -0000 Received: (qmail 34298 invoked from network); 23 Sep 2005 13:25:29 -0000 Received: from 209-128-98-052.bayarea.net (HELO Yost.com) (209.128.98.52) by a.mx.sunsite.dk with SMTP; 23 Sep 2005 13:25:27 -0000 Received: from [192.168.1.2] (209-128-98-052.bayarea.net [209.128.98.52]) by Yost.com (Postfix) with ESMTP id 8A67A635ABC; Fri, 23 Sep 2005 06:25:25 -0700 (PDT) Mime-Version: 1.0 Message-Id: In-Reply-To: <237967ef0509230315ae86ee9@mail.gmail.com> References: <237967ef0509230315ae86ee9@mail.gmail.com> Date: Fri, 23 Sep 2005 06:14:50 -0700 To: Mikael Magnusson From: Dave Yost Subject: Re: input redirect from a variable Cc: zsh-workers@sunsite.dk Content-Type: text/plain; charset="us-ascii" X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.4 Thanks. <(foo) and =(foo) should be mentioned in the REDIRECTION section, where I would have found them. Dave At 12:15 PM +0200 2005-09-23, Mikael Magnusson wrote: >On 9/23/05, Peter Stephenson wrote: >> >> ------- Forwarded Message >> >> Mime-Version: 1.0 >> Message-Id: >> Date: Thu, 22 Sep 2005 13:30:00 -0700 >> To: Peter Stephenson >> From: Dave Yost >> Subject: input redirect from a variable >> Content-Type: text/plain; charset="us-ascii" ; format="flowed" >> >> Hi. >> >> It seems to me that there should be a way to do something like this: >> >> foo1="$(...)" >> foo2="$(...)" >> >> comm -3 <<<<$foo1 <<<<$foo2 >> >> where the <<<$foo1 syntax says to output $foo1 to a tmp file, then >> use that filenamne as the argument, then delete that file. >> >> Thanks >> >> Dave > >I use this function for comparing the hexdump of two files, >hexdiff () { > diff -u <(hexdump "$1") <(hexdump "$2") >} > >so in your case, what you want to do is comm -3 <(...) <(...) >or if you really want >foo1=$(...) >foo2=$(...) >comm -3 <(echo "$foo1") <(echo "$foo2") >but that seems stupid :) >Also note this syntax will provide pipes, if you use =(...) instead >you will get temp files like you asked for. > >-- >Mikael Magnusson