[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.
- Re: Can Bash do simple math?, (continued)
- Re: Can Bash do simple math?, Greg Wooledge, 2024/08/06
- Re: Can Bash do simple math?, alex xmb sw ratchev, 2024/08/06
- Re: Can Bash do simple math?, alex xmb sw ratchev, 2024/08/06
- Re: Can Bash do simple math?, alex xmb sw ratchev, 2024/08/06
- Re: Can Bash do simple math?, alex xmb sw ratchev, 2024/08/06
- Re: Can Bash do simple math?, alex xmb sw ratchev, 2024/08/06
- Re: Can Bash do simple math?,
bash <=
- Re: Can Bash do simple math?, Greg Wooledge, 2024/08/06
- Re: Can Bash do simple math?, alex xmb sw ratchev, 2024/08/06
- Re: Can Bash do simple math?, alex xmb sw ratchev, 2024/08/06