Hi Nelson,

The remainder of 5 when divided by 3 is indeed 2.  And (if I'm not mistaken)
bash doesn't handle floats.  You can use other scripting languages though,
like python and it should be easy there.

Hope this helps,
Allister

On Dec 1, 2007 2:49 AM, Nelson Serafica <[EMAIL PROTECTED]> wrote:

> I'm trying to create a script that will convert b/s to kb/s. To convert to
> kb/s, I must divide it to 1000 b/s. However, the answer does not contain the
> remainder. When I do "expr 5 / 3", it shows only 1 (suppose to be 1.6).
> Doesn't show the remainder .6.
>
> I search in Google and it says the "%" is remainder of a division. But
> when I do expr 5 % 3, it shows "2". It suppose to be 6, am I right?
>
>
> Any inputs,
>
>
>
> --- Forever Linux Newbie
>
> ------------------------------
> Organic foods - just how healthy is health food?
> Be a better foodie
> Find out at Yahoo! 
> Answers<http://ph.answers.yahoo.com/dir/index;_ylt=AsCq4OcgSoQ9qZZdke2cnGi1ChV.;_ylv=3?link=over&sid=396545367>
>
> _________________________________________________
> Philippine Linux Users' Group (PLUG) Mailing List
> [email protected] (#PLUG @ irc.free.net.ph)
> Read the Guidelines: http://linux.org.ph/lists
> Searchable Archives: http://archives.free.net.ph
>



-- 
Dr. Allister Levi Sanchez ( [EMAIL PROTECTED] /
[EMAIL PROTECTED] )
CNRS Postdoctoral Research Associate
Laboratoire Leprince-Ringuet, École Polytechnique, 91128 Palaiseau CEDEX,
France
_________________________________________________
Philippine Linux Users' Group (PLUG) Mailing List
[email protected] (#PLUG @ irc.free.net.ph)
Read the Guidelines: http://linux.org.ph/lists
Searchable Archives: http://archives.free.net.ph

Reply via email to