UNSOLVED

markjgreene

updated

18 years ago

0

437

March 6th, 2009 14:00

Linux Work Station ksh math limits

I am working on a ksh script to run on the Celerra work station, and I'm running into a limit on the integer size in the version of ksh (public domain ksh 5.2). I'm trying to tally file sizes and hitting the limit when the variable reaches 2GB, so I'm guessing that the work station only is using a 32-bit Linux kernel. The uname -a output isn't conclusive.

Here's how I'm doing the math in the script:

TOTAL_SIZE=$(( $TOTAL_SIZE + $FILE_SIZE ))

It also appears that neither dc nor bc are loaded on the system. I tried copying and running the dc binary from another Linux system, but that failed due to missing libraries. I'm assuming I'll run into the same problem with bc.

Has anyone been able to get around this without resorting to perl? And I'm not at all certain that I'll have any better results if I redo the script in perl, which I don't want to as it's 650+lines.

Thanks!
mark
  • Rainer_EMC

    6 Operator

    •

    8645 Posts

    256

    0

    Posted March 10th, 2009 06:00

    Hi Mark,

    what DART version are you using (see nas_version) ?

    Rainer
  • Peter_EMC

    674 Posts

    256

    0

    Posted March 11th, 2009 02:00

    maybe divide your values by 1024 or use awk instead