From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: Jerry Peek <jpeek@jpeek.com>, zsh-users@sunsite.auc.dk
Subject: Re: Two esoteric zsh questions
Date: Fri, 8 Sep 2000 15:25:51 -0700 [thread overview]
Message-ID: <000908152551.ZM32355@candle.brasslantern.com> (raw)
In-Reply-To: <24818.968185312@jpeek.com>
On Sep 5, 1:21pm, Jerry Peek wrote:
>
> (Is *any* zsh question esoteric? Or are *all* zsh questions? ;-)
Both.
> 1) Can anyone explain the difference in the following two cases? The
> first sets a shell variable; the second sets an environment variable.
Zefram answered this.
> 2) I wanted to compare the values of $whoson and $WHOSON.
You mean you wanted to see the differences, not just know whether there
are differences? When I hear "compare the values" I think of
[[ $whoson == $WHOSON ]]
> I couldn't think of a way to use two <<< operators
Right; if you did so, multios would concatenate the two inputs.
> % diff - <(echo $WHOSON) <<<$whoson
> %
>
> Does anyone know a cleaner way to do that?
Aside from using "print -r --" in place of "echo", so that backslashes or
leading hyphens in $WHOSON won't cause problems, the only thing that comes
to mind is
diff <(<<<$whoson) <(<<<$WHOSON)
which is really mostly same as
> % diff - <(cat <<<$WHOSON) <<<$whoson
except that zsh implements the "cat" internally, and you can give the args
in the same order that they'll appear in the diff output, which is slightly
more understandable.
prev parent reply other threads:[~2000-09-08 22:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-09-05 20:21 Jerry Peek
2000-09-08 20:19 ` Zefram
2000-09-08 22:25 ` Bart Schaefer [this message]
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=000908152551.ZM32355@candle.brasslantern.com \
--to=schaefer@candle.brasslantern.com \
--cc=jpeek@jpeek.com \
--cc=zsh-users@sunsite.auc.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).