Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: input redirect from a variable
- X-seq: zsh-workers 21755
- From: Dave Yost <Dave@xxxxxxxx>
- To: Mikael Magnusson <mikachu@xxxxxxxxx>
- Subject: Re: input redirect from a variable
- Date: Fri, 23 Sep 2005 06:14:50 -0700
- Cc: zsh-workers@xxxxxxxxxx
- In-reply-to: <237967ef0509230315ae86ee9@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <EXCHANGE03czi9yzu2300000458@xxxxxxxxxxxxxxxxxx> <237967ef0509230315ae86ee9@xxxxxxxxxxxxxx>
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 <pws@xxxxxxx> wrote:
>>
>> ------- Forwarded Message
>>
>> Mime-Version: 1.0
>> Message-Id: <pdy98830623095bbf58c3401e47@[192.168.1.2]>
>> Date: Thu, 22 Sep 2005 13:30:00 -0700
>> To: Peter Stephenson <pws@xxxxxxx>
>> From: Dave Yost <Dave@xxxxxxxx>
>> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author