From: Dave Yost <Dave@Yost.com>
To: Mikael Magnusson <mikachu@gmail.com>
Cc: zsh-workers@sunsite.dk
Subject: Re: input redirect from a variable
Date: Fri, 23 Sep 2005 06:14:50 -0700 [thread overview]
Message-ID: <pdy988306230973bf59af978329@[192.168.1.2]> (raw)
In-Reply-To: <237967ef0509230315ae86ee9@mail.gmail.com>
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@csr.com> 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@csr.com>
>> From: Dave Yost <Dave@Yost.com>
>> 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
next prev parent reply other threads:[~2005-09-23 13:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-23 8:49 Fwd: " Peter Stephenson
2005-09-23 10:15 ` Mikael Magnusson
2005-09-23 13:14 ` Dave Yost [this message]
2005-09-23 14:21 ` Bart Schaefer
2005-09-23 16:38 ` Dave Yost
2005-09-23 14:43 ` Bart Schaefer
2005-09-23 16:45 ` Peter Stephenson
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='pdy988306230973bf59af978329@[192.168.1.2]' \
--to=dave@yost.com \
--cc=mikachu@gmail.com \
--cc=zsh-workers@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).