* Fwd: export LC_ALL=C
[not found] <602dcf6d-af9b-f804-71b9-a97ee939a7d2@posteo.de>
@ 2022-10-26 18:32 ` Gottfried
0 siblings, 0 replies; only message in thread
From: Gottfried @ 2022-10-26 18:32 UTC (permalink / raw)
To: help-guix
[-- Attachment #1.1.1: Type: text/plain, Size: 2076 bytes --]
sincere thanks
Gottfried
a good explanation is always useful, also for others who will look in
the history.
Am 24.10.22 um 14:40 schrieb Tobias Geerinckx-Rice:
> Hi Gottfried,
>
> I hope this strikes the right balance between explaining ‘environment
> variables’ from scratch and answering your immediate question.
>
> Gottfried 写道:
>> 1. Will this now overwrite my variables for ever, or only for some time?
>
> Environment variables are not saved. They can be *set* by configuration
> files, such at /etc/profile, but these files are not updated when you
> type ‘export GUIX=awesome’ on the command line.
>
> Setting LC_ALL like this affects your current shell, and it will be
> inherited by child processes (hence why the ‘guix’ child will speak
> English after setting LC_ALL=C in the parent shell), but they exist
> purely in RAM for the lifetime of each process.
>
> The also do not propagate to ancestor or sibling processes: setting
> LC_ALL in one terminal window has no effect on any other windows. Nor
> will setting LC_ALL in a shell affect new processes you launch
> elsewhere, such as from your desktop menu. Only child processes
> launched in the same shell/window will inherit it.
>
> As soon as you close that terminal, type ‘exit’ in the (guix) shell, or
> trip over your power cable, the setting is gone.
>
>> 2. How can I set it back to my original state?
>
> Environment variables have no built-in notion of history, or defaults.
> They are just variables, and setting them to something new overwrites
> the old value (if any).
>
> So:
>
> ~$ echo $LC_ALL # yours will be de_DE, I presume
> en_IE.utf8
> ~$ LC_OLD=$LC_ALL # save the old value
> ~$ export LC_ALL=C # in with the new
> ~$ echo $LC_ALL # do the thing
> C
> ~$ LC_ALL=$LC_OLD # restore the old value
>
> But really, in practice, I'd just close the window/shell once done…
> they are so cheap.
>
> Kind regards,
>
> T G-R
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3193 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-10-26 18:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <602dcf6d-af9b-f804-71b9-a97ee939a7d2@posteo.de>
2022-10-26 18:32 ` Fwd: export LC_ALL=C Gottfried
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).