View Single Post

   
  #1 (permalink)  
Old 01-05-2008, 09:00 AM
snickwad
 
Posts: n/a
Default Problems with test and integer variables.

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.

Any suggestions welcome, as this is drivin' me nuts......

Thanks.

Reply With Quote