Re: shell scripting and command expr

2002-04-08 Thread Anthony E. Greene
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Sun, 7 Apr 2002, vincent li wrote: >i need to write a short shell script to get the >available memory percentage,for example: if i get >available memory 2033680, and total memory 2555848, >how could i change these two data into percentage? > >if

Re: shell scripting and command expr

2002-04-07 Thread Cameron Simpson
On 22:55 07 Apr 2002, vincent li <[EMAIL PROTECTED]> wrote: | i need to write a short shell script to get the | available memory percentage,for example: if i get | available memory 2033680, and total memory 2555848, | how could i change these two data into percentage? | | if i excute `expr 2033

shell scripting and command expr

2002-04-07 Thread vincent li
Hi, all i need to write a short shell script to get the available memory percentage,for example: if i get available memory 2033680, and total memory 2555848, how could i change these two data into percentage? if i excute `expr 2033680 / 2555848` ,result is 0, pls tell me how to get the percent