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 10:58:50 +0200

On Tue, Aug 06, 2024 at 07:50:26AM +0900, Koichi Murase wrote:
> SECONDS is a Bash variable. It's automatically updated every second.

Of course it is. I have known this, at some point before, but seem to
have forgotten it. And now I have been reminded, thank you! :)

> All-uppercase variable names are used/defined by the system. You
> should usually avoid creating variables with all-uppercase names in
> application scripts. You can use lowercase variable names.

Huh. Did not know this, though. I mean, if ALL-CAP-VARS are used
internally by Bash then it should follow that one should take care in
creating such variables but I always saw ALL-CAP-VARS as "the standard
way" of naming variables in Bash. Maybe I need to re-think this! Thanks
for the tip.




reply via email to

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