[Bug 1297898] Re: Unbound variables can't be checked with -z anymore

Ken Sharp 1297898 at bugs.launchpad.net
Sat Oct 10 10:42:32 UTC 2020


Is this still an issue in a current release?

** Tags added: trusty

** Changed in: bash (Ubuntu)
       Status: New => Incomplete

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to bash in Ubuntu.
https://bugs.launchpad.net/bugs/1297898

Title:
  Unbound variables can't be checked with -z anymore

Status in bash package in Ubuntu:
  Incomplete

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_UNINITIALIZED_VARIABLE ]
  then
  	echo Variable uninitialized
  fi

  
  Executing this script will result in this output: "./test.sh: line 3: SOME_UNINITIALIZED_VARIABLE: unbound variable"

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1297898/+subscriptions



More information about the foundations-bugs mailing list