-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 1/11/13 1:27 PM, Dan Douglas wrote: > Bash treats the variable as essentially undefined until given at least an > empty value.
This is what Posix says: A variable is a parameter denoted by a name. A parameter is set if it has an assigned value (null is a valid value). Once a variable is set, it can only be unset by using the unset special built-in command. A variable is unset until it has been assigned a value. Setting attributes for a variable can change how it behaves when a value is assigned, but does not assign a value itself, and the variable remains unset -- a simple placeholder -- until it gets one. I know there are some inconsistencies in how bash treats these `invisible' variables, but the above is the way things are supposed to be. Chet - -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (Darwin) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlDwi7gACgkQu1hp8GTqdKsD3QCfQ4JahzpSlhLiSdyTe1cLAU3R LbEAnjzZFXI96APxrxfDlLDk9a9+lPuE =n1+I -----END PGP SIGNATURE-----