delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/08/19/15:01:51

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <43062C7F.8010906@pooryorick.com>
Date: Fri, 19 Aug 2005 15:01:19 -0400
From: Poor Yorick <com DOT cygwin DOT cygwin AT pooryorick DOT com>
User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: bash test -n && test -z return tru
X-IsSubscribed: yes

from reading the bash man pages, I would have thought the -n and -z were 
mutually exclusive.  Therefore I don't understand this result:

~>$ [ -n $(which nonexisingfilename 2>/dev/null) ] && [ -z $(which 
nonexistingfilename 2&>/dev/null) ]  && echo hello
hello
~>$

can anyone help explain this?

--
Poor Yorick


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019