TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: PETE
from: CHRIS GREEN
date: 2020-08-10 08:56:00
subject: Re: Strange construct in

Pete  wrote:
> Coming in a month late on this, but I'm curious...
>
> In article ,
> Andy Burns   wrote:
> >
> >the open square bracket is usually
> >
> >/usr/bin/[
> >
> >which might be a hard or soft link to /usr/bin/test
> >
> I'd forgotten this convention, so I went and looked... and it's not!
> I mean '[' is not a link, but an executable of its own, that's a different
> length from /usr/bin/test.  This is true on the Pi, on my Linux laptop,
> and even in Haiku. My question is, why?
>
Looking at strings within the '[' executable I see, among other
things:-

    NOTE: [ honors the --help and --version options, but test does not.
    test treats each of those as it treats any other nonempty STRING.

So, at least on Ubuntu Linux, they aren't identical.

--
Chris Green
ยท

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.