Unbound variables can't be checked with -z anymore
Bug #1297898 reported by
Removed by request
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| bash (Ubuntu) |
Expired
|
Undecided
|
Unassigned | ||
Bug Description
I'm using Ubuntu 14.04 dev with bash 4.3-4ubuntu1 and if bash is started with the -u parameter any check of unbound variables will raise an unbound exception. Here is a testcase:
#!/bin/bash -u
if [ -z $SOME_UNINITIAL
then
echo Variable uninitialized
fi
Executing this script will result in this output: "./test.sh: line 3: SOME_UNINITIALI
To post a comment you must log in.

Is this still an issue in a current release?