[plug] problem found in "if" statement
John Usher (Maptek)
John.Usher at perth.maptek.com.au
Thu Aug 28 08:58:11 WST 2003
[ is test (/usr/bin/[ is usually symlinked to test).
According to the 'test' manpage, >= is not supported
try:
if [ "$vMLSTAT" -ge 0 ]; then
...
-----Original Message-----
From: Arie Hol [mailto:arie99 at ozemail.com.au]
Sent: Wednesday, 27 August 2003 8:10 PM
To: plug at plug.linux.org.au
Subject: Re: [plug] problem found in "if" statement
At 09:13 AM 27-08-2003 +0800, you wrote:
>I've found a problem in an "if" statement and cannot find a fix. The
statement is
>if [ "$vMLSTAT" >= 0 ]; then
> .....
> .....
>
>fi
> I'm getting a unary operator expected.
Could it be because you are trying to evaluate a 'string' against an
'integer' in the hope that you will get a 'boolean' as a result ?????
Regards Arie Hol
>--------------------------------------------<
For the concert of life, nobody has a program.
>--------------------------------------------<
More information about the plug
mailing list