Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/etc/rc.d



On Thu, Feb 15, 2007 at 04:54:23PM +0000, Christos Zoulas wrote:
> >
> >Log Message:
> >Remove unnessary "if [ X"$foo" ... ]" hack which is not necessary if
> >you quote things properly which this script does.
> >
> 
> quoting does not help you if the variable expansion ends up starting
> with "-".

In this case test(1) is being called with three arguments, so posix
requires that the middle one be treated as the operator.
Posix is very specific about the bahaviour of test(1) for small numbers
of arguments, and explicitly states it is undefined for larger numbers.

        David

-- 
David Laight: david%l8s.co.uk@localhost



Home | Main Index | Thread Index | Old Index