From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7520 invoked from network); 8 Sep 2000 22:27:53 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 8 Sep 2000 22:27:53 -0000 Received: (qmail 7854 invoked by alias); 8 Sep 2000 22:26:16 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 3414 Received: (qmail 7847 invoked from network); 8 Sep 2000 22:26:14 -0000 From: "Bart Schaefer" Message-Id: <000908152551.ZM32355@candle.brasslantern.com> Date: Fri, 8 Sep 2000 15:25:51 -0700 In-Reply-To: <24818.968185312@jpeek.com> Comments: In reply to Jerry Peek "Two esoteric zsh questions" (Sep 5, 1:21pm) References: <24818.968185312@jpeek.com> X-Mailer: Z-Mail Lite (5.0.0 30July97) To: Jerry Peek , zsh-users@sunsite.auc.dk Subject: Re: Two esoteric zsh questions MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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.