On Sun, Feb 27, 2005 at 01:34:20PM +0100, Marco d'Itri wrote:
> I tested this script with bash, dash and even posh, and it works fine.
>
> #!/bin/sh -e
> echo a
> unset no_such_variable1 no_such_variable2
> echo b
[EMAIL PROTECTED]:~$ ./testunset.sh
a
[EMAIL PROTECTED]:~$ dpkg -S /bin/sh
bash: /bin/sh
[EMAIL PROTECTED]:~$ dpkg -l bash
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version Description
+++-==============-==============-============================================
ii bash 2.05a-11 The GNU Bourne Again SHell
After upgrading bash to bash/unstable:
[EMAIL PROTECTED]:~$ ./testunset.sh
a
b
[EMAIL PROTECTED]:~$ dpkg -l bash
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version Description
+++-==============-==============-============================================
ii bash 3.0-14 The GNU Bourne Again SHell
Looks like a bug in old bash versions since SUSv2 says
"Unsetting a variable or function that was not previously set is not
considered an error and will not cause the shell to abort."
--
Jan fortune: can't load library '/libc.so.4'
No such library.
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]