dereferencing undefined variables (as a test to see whether they are assigned or not) is considered standard practice in bash scripting.

There are many, many scripts in debian that use this feature; running your system with set -u will BREAK these scripts so they will not function properly. This is because [ -z $foo ] should return 0 (success) if $foo is unassigned, however if you set -u then it returns 1 (failure).

To get an idea of how many scripts on your system will break when you run them with set -u, you can do a quick grepping:

grep -I ' -z ' /bin/* /usr/bin/*

So don't use set -u, unless you are actively debugging a script that you are writing (that is what it's for.)




--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to