In sh, is '[' a portable synonym for 'test'?

John Ruschmeyer john at moncol.UUCP
Mon Oct 21 01:39:18 AEST 1985


>From: ado at elsie.UUCP (Arthur David Olson)
>Message-ID: <5242 at elsie.UUCP>
>Organization: NIH-LEC, Bethesda, MD
>
>> Any good reason *NOT* to make the link?
>
>If you want your software to be portable to sites where the administrators
>refuse to make the link (for *whatever* reason), don't make the link on your
>own site.

Actually, that almost sounds like a good reason to make the link, but
never use it in your own software. Therefore you do have some compatability
with the Sys V and 4.2 programmers who use '[' instead of 'test'.

Now if there was a patch for the v7 'sh' to use '#' as a real comment....

-- 
Name:		John Ruschmeyer
US Mail:	Monmouth College, W. Long Branch, NJ 07764
Phone:		(201) 222-6600 x366
UUCP:		...!vax135!petsd!moncol!john	...!princeton!moncol!john
						   ...!pesnta!moncol!john

	    "It all started out as a mild curiousity in a junkyard...
	    and now it's turned out to be quite a spirit of adventure."



More information about the Comp.unix.wizards mailing list