bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Referencing empty array with "set -u" active throws error


From: jens . schmidt35
Subject: Re: Referencing empty array with "set -u" active throws error
Date: Mon, 20 Dec 2010 09:52:15 +0100 (CET)

> -u  Treat unset variables as an error when substituting.
> 
> I think the behaviour is consistent with the documentation.

The question is rather when to consider a variable set or unset.

For me, an empty string (or empty commadline) is as set or as
unset as an empty array.  But I don't get an "unbound error" when
accessing an empty string (or empty commandline), and I get one
when accessing an empty array.

I can live with that behaviour, but it probably should be precisely
documented when a variable is set or unset for Bash.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]