Parse output of "net use", but language varies - force language for "net use"?
Csaba Ráduly
rcsaba@gmail.com
Mon Jul 22 18:49:52 GMT 2024
On 21/07/2024 05:57, Thomas Wolff via Cygwin wrote:
>
>
> Am 21.07.2024 um 01:54 schrieb Takashi Yano via Cygwin:
>> On Sat, 20 Jul 2024 15:44:17 +0200
>> Mark Liam Brown wrote:
>>> 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?
>> Did you try
>> chcp.com 437
> That could change the character encoding, for some (older) programs, not
> the language.
Plus, it sounds like a global solution to a local problem:
https://devblogs.microsoft.com/oldnewthing/20081211-00/?p=19873
Csaba
--
Life is complex, with real and imaginary parts.
More information about the Cygwin
mailing list