URL: <https://savannah.gnu.org/support/?111350>
Summary: problems using date in .bash_profile
Group: The GNU Bourne-Again SHell
Submitter: None
Submitted: Sun 30 Nov 2025 03:09:45 AM UTC
Category: None
Priority: 5 - Normal
Severity: 3 - Normal
Status: None
Privacy: Public
Assigned to: None
Originator Email: [email protected]
Open/Closed: Open
Discussion Lock: Unlocked
Operating System: None
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Sun 30 Nov 2025 03:09:45 AM UTC By: Anonymous
Dear GNU / Bash:
On Rocky 9.6 (fully updated as of 10nov25 waiting for 9.7)
I am trying to figure out a problem I am having in thunderbird and need to
have a modzilla envvar created when I use startup application to fire off
thunderbird. The only place I am aware I can do this is in .bash_profile.
I have added the following line to .bash_profile:
+++
export MOZ_LOG="compact:5,timestamp"
export MOZ_LOG_FILE="/tmp/moz_log_file__$(date +%F_%H-%M-%S)"
+++
When I power up and log in, I can see that the file was created:
+++
-rw-r--r--. 1 paul paul 0 Nov 29 17:52
/tmp/moz_log_file__2025-11-29_17-28-10.moz_log
+++
The date is always correct (so far) but the time is often off. A few times its
right but usually it has no bearing to the time the file was created. I am not
expecting exact but certain +/- one minute at most. The above example is dated
about 26 minutes earlier than when file was created.
Am I missing some understanding of state of my computer when .bash_profile is
sourced? Or is this some form of a bug somewhere / somehow? Is there a better
way for me to do this (short of always opening a terminal, setting the envvar,
and then firing off thunderbird.
Thanks in advance,
Paul
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/support/?111350>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
