From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Engel Date: Mon, 22 Aug 2005 12:57:58 +0200 Subject: [U-Boot-Users] test variable existence in hush Message-ID: <20050822125758.00001da8@idefix> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi, can anyone confirm that this is a bug in the hush shell: both test -n "$foo" && echo yes and test -z "$foo" && echo yes result in nothing echoed if foo is not defined. If, on the other hand, foo is defined to a string containing blanks, both commands will echo yes. Is there another way to check the existence of a variable? Regards, Andreas Engel