From: Michael Prokop <news@michael-prokop.at>
To: zsh-workers@sunsite.dk
Subject: Unsetting a variable that was not previously set [kind of update]
Date: Wed, 9 Mar 2005 15:14:46 +0100 [thread overview]
Message-ID: <2005-03-09T14-51-46@devnull.michael-prokop.at> (raw)
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 <URL:http://www.zsh.org/mla/users/2003/msg00314.html>) ->
| 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/
next reply other threads:[~2005-03-09 14:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-09 14:14 Michael Prokop [this message]
2005-03-09 17:07 ` Peter Stephenson
2005-03-09 20:31 ` Michael Prokop
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=2005-03-09T14-51-46@devnull.michael-prokop.at \
--to=news@michael-prokop.at \
--cc=zsh-workers@sunsite.dk \
--cc=zsh@michael-prokop.at \
/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).