delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/03/23/12:47:51

X-Spam-Check-By: sourceware.org
Message-ID: <4422DF2A.4000202@russellonthenet.com>
Date: Thu, 23 Mar 2006 11:47:22 -0600
From: Russell Montgomery <work AT russellonthenet DOT com>
User-Agent: Thunderbird 1.5 (Windows/20051201)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: The binary "[.exe"
References: <20060323173441 DOT 90168 DOT qmail AT web50105 DOT mail DOT yahoo DOT com>
In-Reply-To: <20060323173441.90168.qmail@web50105.mail.yahoo.com>
X-IsSubscribed: yes
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

Hi Vanessa,

The [ is the test operator.  Normally it is used in conditional
statements ( if [ "$TERM" = "xterm" ]; then ...) but testing can be used
in conjunction with logical testing (&& || - logical and, logical or)
for example: [ "$TERM" = "xterm" ] && echo "you are using xterm"
[ $? -eq 0 ] || exit   # This will exit if the previous exit status was
non-zero

Russell
---
Corpus Christi, Texas where's it's currently 54 and breezy

Vanessa Murdock wrote:
> Hi,
>
> I downloaded and installed cygwin.  I did an ls -la on
> the /usr/bin/ directory and found a binary called
> "[.exe".  Is this a legitimate utility (and what does
> it do)?  
>
> (Note:  I tried searching the web and the mail list
> archives for information about this, but the "["
> character isn't recognized (with or without quotes),
> and so every post that mentions ".exe" is retrieved,
> which is almost all of them.  So I apologize if this
> has been answered elsewhere.)
>
> Thanks,
>
> Vanessa
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
>
> --
> 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/
>
>
>   


--
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