From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12540 invoked from network); 9 Mar 2005 14:15:07 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 9 Mar 2005 14:15:07 -0000 Received: (qmail 76061 invoked from network); 9 Mar 2005 14:14:59 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 9 Mar 2005 14:14:59 -0000 Received: (qmail 21219 invoked by alias); 9 Mar 2005 14:14:57 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 20954 Received: (qmail 21209 invoked from network); 9 Mar 2005 14:14:56 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 9 Mar 2005 14:14:56 -0000 Received: (qmail 75781 invoked from network); 9 Mar 2005 14:14:53 -0000 Received: from unknown (HELO vrs.michael-prokop.at) (81.223.126.153) by a.mx.sunsite.dk with SMTP; 9 Mar 2005 14:14:47 -0000 Received: from localhost (unknown [81.223.126.153]) by vrs.michael-prokop.at (Postfix) with ESMTP id BF91E1026D for ; Wed, 9 Mar 2005 15:14:46 +0100 (CET) Date: Wed, 9 Mar 2005 15:14:46 +0100 From: Michael Prokop To: zsh-workers@sunsite.dk Subject: Unsetting a variable that was not previously set [kind of update] Message-ID: <2005-03-09T14-51-46@devnull.michael-prokop.at> Reply-To: Michael Prokop Mail-Followup-To: zsh-workers@sunsite.dk Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-URL: http://www.michael-prokop.at/ X-Operating-System: Debian GNU/Linux - 2.6.8.1 on a i686 X-Registered-Linux-User: 224337 X-Crypto: GnuPG/1.2.3 http://www.gnupg.org X-GPG-Key-ID: 0x37E272E8 X-GPG-Key: http://www.michael-prokop.at/gpg X-GPG-Fingerprint: 04AE E62C 9502 CD34 A7DA 857B D8DF 53FB 37E2 72E8 User-Agent: mutt-ng 1.5.8i (Debian) X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.6 required=6.0 tests=BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.6 Hello, I noticed a "problem" when unsetting variable(s): % cat foo1 #!/bin/sh -e a=b unset a && echo foo unset a && echo bar % ./foo1 foo % cat foo2 #!/bin/sh -e a=b unset a && echo foo unset c && echo bar % ./foo2 foo I found the thread "Unsetting a variable that was not previously set" -> http://www.zsh.org/mla/users/2003/msg00312.html in the zsh-ml-archive. According to http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=297137 bash3, dash and posh handle it in another way than zsh does. That's what Chet [from bash] said about bash's behaviour (according to ) -> | I got a bug report or two, and decided that the new behavior is | what POSIX.2 intended. It seems to be what sh has always | done. As this behaviour broke the hotplug-system on my Linux Live-CD-system where zsh is used as /bin/sh I would like to know if this behaviour of zsh might be changed in future or if I should fix such scripts on my own. thx && regards, -mika- -- ,'"`. http://www.michael-prokop.at/ ( grml.org -» Linux for texttool-users and sysadmins `._, http://www.grml.org/