View Single Post

   
  #2 (permalink)  
Old 01-05-2008, 08:00 AM
Hajo Ehlers
 
Posts: n/a
Default Re: Problems with test and integer variables.

snickwad wrote:
> Hi , have a problem in a Kornshell script that I have so far been
> unable to get around.
>
> The section applies to a test on an integer variable.
> Code reads:
>
> typeset -i file_count
>
> if [ $file_count -eq 0 ]
> then
> return
> else
> process_file
> fi
>
> The problem seems to arise when the variable is set to a value that is
> a multiple of 256. The function containing this section has returned
> (unexpectedly) when the value of file_count has been set to a value of
> 256, 512 and 1024.
>


At least on AIX 5.1 and ksh (88) i could not reproduce the problem.
Your script example works as expected.

Hajo

Reply With Quote