The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: jrvalverde@cnb.uam.es (Jose R. Valverde)
Subject: [TUHS] test / [
Date: Wed, 5 Dec 2007 17:00:09 +0100	[thread overview]
Message-ID: <20071205170009.3e807bec@veda.cnb.uam.es> (raw)
In-Reply-To: <ace45c0a0712041620u75009acmc2f82b7755cd39e2@mail.gmail.com>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1730 bytes --]

What I seem to remember is that it was a trick used in BSD to achieve 
compatibility with SystemV shell scripts (the shell on System-V would
understand [ .. ] but the one on BSD wouldn't and making [ a symlink
to test would fix the problem).

My copy of Portable C and UNIX system programming only mentions that
the [ .. ] construct may be missing on some shell versions and this
can usually be fixed by symlinking [ to test.

A hardlink from /bin/[ to /bin/test was present on Ultrix since at 
least 3.1, which would also attest to the BSDism or workaround for
non-System-V systems. Sorry, this is too far back in time for my 
feeble memory.

				j

On Wed, 5 Dec 2007 11:20:38 +1100
"Christopher Vance" <cjsvance at gmail.com> wrote:
> On Dec 5, 2007 10:25 AM, Greg 'groggy' Lehey <grog at lemis.com> wrote:
> > FreeBSD and NetBSD still have this link:
> >
> > $ ls -li /bin/[ /bin/test
> > 683091 -r-xr-xr-x  2 root  wheel  7460 Aug 19  2006 /bin/[
> > 683091 -r-xr-xr-x  2 root  wheel  7460 Aug 19  2006 /bin/test
> >
> > I suppose OpenBSD does too, but I don't have a machine to check.
> 
> Still there as of the latest release.
> 
> -- 
> Christopher Vance
> _______________________________________________
> TUHS mailing list
> TUHS at minnie.tuhs.org
> https://minnie.tuhs.org/mailman/listinfo/tuhs


-- 
	These opinions are mine and only mine. Hey man, I saw them first!

			    José R. Valverde

	De nada sirve la Inteligencia Artificial cuando falta la Natural
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20071205/a685ed4b/attachment.sig>


      reply	other threads:[~2007-12-05 16:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-21 13:35 Tim Bradshaw
2007-11-21 13:51 ` Jim Capp
2007-12-04 23:25   ` Greg 'groggy' Lehey
2007-12-05  0:20     ` Christopher Vance
2007-12-05 16:00       ` Jose R. Valverde [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071205170009.3e807bec@veda.cnb.uam.es \
    --to=jrvalverde@cnb.uam.es \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).