delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/03/24/21:59:35

X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
Subject: RE: Re: The binary "[.exe"
Date: Fri, 24 Mar 2006 21:59:18 -0500
Message-ID: <31DDB7BE4BF41D4888D41709C476B6570246AEAE@NIHCESMLBX5.nih.gov>
From: "Buchbinder, Barry \(NIH/NIAID\) [E]" <BBuchbinder AT niaid DOT nih DOT gov>
To: <cygwin AT cygwin DOT 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
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id k2P2xTqj013104

Eric Blake wrote:
> Vanessa Murdock <vanessa01075 <at> yahoo.com> writes:
> 
>> 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)?
> 
> Yes it is legitimate - it is part of coreutils.  For what it does,
> try "/bin/[ --help".  Your shell probably also provides it as a
> builtin.  It is an alias for test.  
> 
> --
> Eric Blake
> volunteer cygwin coreutils maintainer

I would have thought that /bin/test.exe and /bin/[.exe would be
identical, but they are not.

    /> ls -og /bin/test.exe /bin/[.exe
    -rwxr-x---+ 1 29696 2006-02-14 09:22:10 /bin/[.exe*
    -rwxr-x---+ 1 24064 2006-02-14 09:22:09 /bin/test.exe*

"/bin/[ --help" gives a message while "/bin/test --help" is silent.
(Interestingly, "strings /bin/test.exe" show that "test.exe" contains
the help message.) "[ --version" give the FSF copyright notice while
"strings test.exe" does not find one.

Are they supposed to be different?

If they are supposed to be different: For my education, why are they
different?  (Though as long as they function identically, it does not
really matter.)

TIA for your explanation.  And thanks for all the work you do
maintaining coreutils and bash.

- Barry

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