On 7/20/2024 9:44 AM, Mark Liam Brown via Cygwin wrote:
Greetings!

I am trying to parse the output of "net use" in a bash script, but hit
a roadblock:
The output of "net use" changes with the language of the system
(English, Danish, French, ...), so parsing becomes nearly impossible

How can I force the language used by "net use" to English, even if the
system default language is Danish or French?

Mark

Poking around on the web a little suggests that Windows does not use an
environment variable like LANG to control the language.  Rather, the relevant
settings seem to live in the registry.  It seems a little dangerous and
fragile to me to change the registry and change it back, but that may be the
only approach unless there's a concept of "change a registry entry for this
session only" or something like that.

HTH, and I'm more than happy to have someone more knowledgeable expand or
correct this!

Eliot Moss

--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

Reply via email to