[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Does "LC_ALL=C" work on all shells?



On 13/02/24 at 23:23, Nicolas George wrote:
Will Mengarini (12024-02-13):
* Greg Wooledge <greg@wooledge.org> [24-02/13=Tu 15:59 -0500]:
In csh, you need to use env.  Like this:
                 ^^^^

What Greg posted also works, because it's an
invocation of the 'env' command, not csh syntax.

Yes. What made Greg's statement false was not the fact that it does not
work but the verb “need”.

What you posted also works, but it runs the command in a subshell of
csh, so I doubt it gains efficiency over running the command under env.

env is also executed in a subshell, but unlike what I posted, env will
also require an exec() and probably some dynamic linking.


Well, I'll go with env command syntax for shells portability. I was asking this because I want to suggest a change to the DDP (Debian Documentation Project) members for the releases notes documentation ¹

The change I want to suggest is to add "env LC_ALL=C" to the "script" command:

# env LC_ALL=C script -t 2>~/upgrade-bookwormstep.time -a ~/upgrade-bookwormstep.script

I think that a recorded session with the output of the commands in English is better then a localized session for debugging purposes.

Thanks to all for the feedback!

¹ https://www.debian.org/releases/stable/amd64/release-notes/ch-upgrading.en.html#record-session
--
Franco Martelli


Reply to: