From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6328 invoked from network); 8 Sep 2000 19:37:12 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 8 Sep 2000 19:37:12 -0000 Received: (qmail 19150 invoked by alias); 8 Sep 2000 19:36:45 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 3412 Received: (qmail 19143 invoked from network); 8 Sep 2000 19:36:44 -0000 From: Jerry Peek X-Mailer: nmh-1.0 To: zsh-users@sunsite.auc.dk Subject: Two esoteric zsh questions Date: Tue, 05 Sep 2000 13:21:52 -0700 Message-ID: <24818.968185312@jpeek.com> (Is *any* zsh question esoteric? Or are *all* zsh questions? ;-) Here's a question that might be a bug, then a follow-up "how to". I'm using 3.0.7 on Linux (Red Hat 6.2) right now. ---------------------------------------------------------------------- 1) Can anyone explain the difference in the following two cases? The first sets a shell variable; the second sets an environment variable. In the second, I have to quote the `who`: % whoson=`who` % % export WHOSON=`who` zsh: not an identifier: 06:56 % export WHOSON="`who`" % (The first line of the "who" output ends with 06:56.) I looked through the FAQ and scanned through a change list... but didn't spot changes in more recent versions, so I'm asking the list. Is the difference a bug, side effect, or feature? ---------------------------------------------------------------------- 2) I wanted to compare the values of $whoson and $WHOSON. I couldn't think of a way to use two <<< operators, so I tried this kludge: % diff - <(echo $WHOSON) <<<$whoson % Does anyone know a cleaner way to do that? [BTW, this next mess wasn't as simple but it worked fine too: % diff - <(cat <<<$WHOSON) <<<$whoson zsh is amazing...] ---------------------------------------------------------------------- Thanks! --Jerry Peek, jpeek@jpeek.com http://www.jpeek.com/ PS: I mentioned last spring that the third edition of Unix Power Tools will cover zsh -- and asked if the new shell would be ready by August so we could put it on the book's CD-ROM. FYI, due to some scheduling problems, I'm still working on the book; the target date is early 2001.)