Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #267379
| From | Greg Wooledge <greg@wooledge.org> |
|---|---|
| Newsgroups | linux.debian.user |
| Subject | Re: Does "LC_ALL=C" work on all shells? |
| Date | 2024-02-13 22:50 +0100 |
| Message-ID | <I78P7-9XwL-3@gated-at.bofh.it> (permalink) |
| References | <I77T4-9WUa-11@gated-at.bofh.it> <I78vL-9Xqx-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Feb 13, 2024 at 01:21:20PM -0800, John Conover wrote:
> egrep ALL .bashrc
> LC_ALL=C
This has gone pretty far off the rails, but here we are. Let's address
this.
DO NOT set LC_ALL in your .bashrc or equivalent files. This is a horrible
idea. LC_ALL should only be used in single commands as a full-powered
override, for example when you want to report a bug, and need the output
to be normalized to the "C" locale.
In your everyday operations, you should use the LANG variable for the
locale that most closely matches your needs, and individual LC_*
variables (such as LC_TIME) for specific overrides. Setting it up this
way allows you to override with LC_ALL when needed, *and* it allows you
to fine-tune your preferences.
For example, let's say you wanted the C locale for most things, but
the en_US.utf8 locale for one particular setting (let's say LC_TIME).
You can do this with:
LANG=C LC_TIME=en_US.utf8
but if you try it this way:
LC_ALL=C LC_TIME=en_US.utf8
then it won't work, because LC_ALL overrides everything. Your LC_TIME
setting will have no effect.
Of course, *none* of this is relevant to the original question, which
was about the shell syntax for overriding environment variables on a
single command.
Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Does "LC_ALL=C" work on all shells? Franco Martelli <martellif67@gmail.com> - 2024-02-13 21:50 +0100
Re: Does "LC_ALL=C" work on all shells? Greg Wooledge <greg@wooledge.org> - 2024-02-13 22:00 +0100
Re: Does "LC_ALL=C" work on all shells? Nicolas George <george@nsup.org> - 2024-02-13 22:10 +0100
Re: Does "LC_ALL=C" work on all shells? Will Mengarini <seldon@eskimo.com> - 2024-02-13 23:00 +0100
Re: Does "LC_ALL=C" work on all shells? Nicolas George <george@nsup.org> - 2024-02-13 23:30 +0100
Re: Does "LC_ALL=C" work on all shells? Franco Martelli <martellif67@gmail.com> - 2024-02-14 17:20 +0100
Re: Does "LC_ALL=C" work on all shells? Greg Wooledge <greg@wooledge.org> - 2024-02-14 17:20 +0100
Re: Does "LC_ALL=C" work on all shells? Franco Martelli <martellif67@gmail.com> - 2024-02-14 17:40 +0100
Re: Does "LC_ALL=C" work on all shells? Greg Wooledge <greg@wooledge.org> - 2024-02-14 17:50 +0100
Re: Does "LC_ALL=C" work on all shells? Franco Martelli <martellif67@gmail.com> - 2024-02-14 21:50 +0100
Re: Does "LC_ALL=C" work on all shells? Greg Wooledge <greg@wooledge.org> - 2024-02-14 22:00 +0100
Re: Does "LC_ALL=C" work on all shells? Max Nikulin <manikulin@gmail.com> - 2024-02-15 03:30 +0100
Re: Does "LC_ALL=C" work on all shells? Franco Martelli <martellif67@gmail.com> - 2024-02-15 21:20 +0100
Re: Does "LC_ALL=C" work on all shells? Max Nikulin <manikulin@gmail.com> - 2024-02-16 03:10 +0100
Re: Does "LC_ALL=C" work on all shells? Franco Martelli <martellif67@gmail.com> - 2024-02-16 17:40 +0100
Re: Does "LC_ALL=C" work on all shells? Greg Wooledge <greg@wooledge.org> - 2024-02-16 17:50 +0100
Re: Does "LC_ALL=C" work on all shells? <tomas@tuxteam.de> - 2024-02-16 19:30 +0100
Re: Does "LC_ALL=C" work on all shells? Franco Martelli <martellif67@gmail.com> - 2024-02-16 22:30 +0100
Re: Does "LC_ALL=C" work on all shells? Max Nikulin <manikulin@gmail.com> - 2024-02-17 04:20 +0100
Re: Does "LC_ALL=C" work on all shells? David Wright <deblis@lionunicorn.co.uk> - 2024-02-16 03:40 +0100
Re: Does "LC_ALL=C" work on all shells? Max Nikulin <manikulin@gmail.com> - 2024-02-16 04:10 +0100
Re: Does "LC_ALL=C" work on all shells? Teemu Likonen <tlikonen@iki.fi> - 2024-02-16 08:20 +0100
Re: Does "LC_ALL=C" work on all shells? Greg Wooledge <greg@wooledge.org> - 2024-02-16 13:20 +0100
Re: Does "LC_ALL=C" work on all shells? Franco Martelli <martellif67@gmail.com> - 2024-02-16 17:40 +0100
Re: Does "LC_ALL=C" work on all shells? Nicolas George <george@nsup.org> - 2024-02-13 22:00 +0100
Re: Does "LC_ALL=C" work on all shells? Nicolas George <george@nsup.org> - 2024-02-13 22:30 +0100
Re: Does "LC_ALL=C" work on all shells? conover@panix.com (John Conover) - 2024-02-13 22:30 +0100
Re: Does "LC_ALL=C" work on all shells? Greg Wooledge <greg@wooledge.org> - 2024-02-13 22:50 +0100
Re: Does "LC_ALL=C" work on all shells? Nicolas George <george@nsup.org> - 2024-02-13 23:50 +0100
Re: Does "LC_ALL=C" work on all shells? Greg Wooledge <greg@wooledge.org> - 2024-02-14 00:00 +0100
Re: Does "LC_ALL=C" work on all shells? Gremlin <scott-andrews@columbus.rr.com> - 2024-02-14 01:40 +0100
Re: Does "LC_ALL=C" work on all shells? Andy Smith <andy@strugglers.net> - 2024-02-14 01:50 +0100
Re: Does "LC_ALL=C" work on all shells? Gremlin <scott-andrews@columbus.rr.com> - 2024-02-14 02:00 +0100
Re: Does "LC_ALL=C" work on all shells? Greg Wooledge <greg@wooledge.org> - 2024-02-14 02:20 +0100
Re: Does "LC_ALL=C" work on all shells? Max Nikulin <manikulin@gmail.com> - 2024-02-14 03:30 +0100
Re: Does "LC_ALL=C" work on all shells? Gremlin <scott-andrews@columbus.rr.com> - 2024-02-14 03:50 +0100
Re: Does "LC_ALL=C" work on all shells? Greg Wooledge <greg@wooledge.org> - 2024-02-14 04:20 +0100
Re: Does "LC_ALL=C" work on all shells? Gremlin <scott-andrews@columbus.rr.com> - 2024-02-14 11:30 +0100
Re: Does "LC_ALL=C" work on all shells? Gremlin <scott-andrews@columbus.rr.com> - 2024-02-13 23:50 +0100
csiph-web