[plug] problem found in "if" statement

Jon Miller jlmiller at mmtnetworks.com.au
Thu Aug 28 00:18:58 WST 2003


Is there a way to find out if the result is a string or integer?
The general output is a listing of PID in a single column. I would think these are integers. Using awk I only need the 1st PID number.

jlm

Jon L. Miller, MCNE, CNS
Director/Sr Systems Consultant
MMT Networks Pty Ltd
http://www.mmtnetworks.com.au

"I don't know the key to success, but the key to failure
 is trying to please everybody." -Bill Cosby



>>> arie99 at ozemail.com.au 8:09:43 PM 27/08/2003 >>>
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