This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Re: The binary "[.exe"


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]