help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can Bash do simple math?


From: alex xmb sw ratchev
Subject: Re: Can Bash do simple math?
Date: Tue, 6 Aug 2024 19:55:22 +0200

On Tue, Aug 6, 2024, 19:08 <bash@blaklinten.xyz> wrote:

> On Tue, Aug 06, 2024 at 06:24:13PM +0200, alex xmb sw ratchev wrote:
> > i say users code has
> > seconds = diffinseconds % 60
> > not
> > minutes = diffinseconds % 60
> >
> diff_in_seconds % 60 gives the seconds portion of diff_in_seconds.
> i.e. diff_in_seconds = 54 -> 54 % 60 = 54.
>      diff_in_seconds = 325 -> 325 % 60 = 25.
>

when both are in_seconds , 325 seconds % 60 aint seconds

.. % 60 is next base aafftteerr seconds

>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]