[PATCH] Use '[]' over 'test' throughout.

Gaetan Nadon memsize at videotron.ca
Tue Sep 14 06:50:44 PDT 2010


On Tue, 2010-09-14 at 07:29 -0400, Trevor Woerner wrote:

> Consistently use one conditional notation, ('[]') over
> the other ('test').
> 

I am not an expert on shells, but I think the [] construct is less
portable that the "test" construct.
If you grep the "configure" scripts generated by Autoconf, it
exclusively uses "test". I have not read every line
carefully however. If you grep the configure.ac files, same story.

Hopefully other reviewers could clarify this point. For shell newbees
like myself, "test" is more intuitive than
a pair of brackets. And, yes, even better if the chosen scheme is used
consistently.

Gaetan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100914/4805eff9/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100914/4805eff9/attachment.pgp>


More information about the xorg-devel mailing list