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: bash
Subject: Re: Can Bash do simple math?
Date: Tue, 6 Aug 2024 19:07:29 +0200

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.



reply via email to

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