On Fri, 15 Feb 2008, Nick Zeljkovic wrote:-
That is a workaround for older version of bash and uninitialized variables, I've had to use it many times.
Must have been a very old version. The oldest one I have access to is bash-2.05b-305.1[0] and that has no problem with uninitialised variables, or the use of -z as a test. Then again, I have always wrapped variables in quotes so any tests I perform won't fail with empty strings. [0] davjam@thargon:~> rpm -qi bash Name : bash Relocations: (not relocatable) Version : 2.05b Vendor: SuSE Linux AG, Nuernberg, Germany Release : 305.1 Build Date: Sat 24 Apr 2004 19:57:34 BST Install date: Mon 01 Nov 2004 21:59:40 GMT Build Host: welles.suse.de Group : System/Shells Source RPM: bash-2.05b-305.1.src.rpm Size : 2401001 License: GPL Signature : DSA/SHA1, Sat 24 Apr 2004 22:00:05 BST, Key ID a84edae89c800aca Packager : http://www.suse.de/feedback URL : http://www.gnu.org/software/bash/bash.html Summary : The GNU Bourne-Again Shell Description : Bash is an sh-compatible command interpreter that executes commands read from standard input or from a file. Bash incorporates useful features from the Korn and C shells (ksh and csh). Bash is intended to be a conformant implementation of the IEEE Posix Shell and Tools specification (IEEE Working Group 1003.2). Authors: -------- Brian Fox <bfox@gnu.org> Chet Ramey <chet@ins.cwru.edu> Distribution: SuSE Linux 9.1 (i586) Regards, David Bolt -- Team Acorn: http://www.distributed.net/ OGR-P2 @ ~100Mnodes RC5-72 @ ~15Mkeys SUSE 10.1 32bit | openSUSE 10.2 32bit | openSUSE 10.3 32bit | openSUSE 11.0a1 SUSE 10.1 64bit | openSUSE 10.2 64bit | openSUSE 10.3 64bit RISC OS 3.6 | TOS 4.02 | openSUSE 10.3 PPC | RISC OS 3.11 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org