DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 46KDx0lH1673388 Authentication-Results: delorie.com; dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=G6ETWdEn X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 19C823860C0C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1721483940; bh=w4/Bvowh884AygnQl5ECd+1EeG3OgWbLC5NjBsD8JK0=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=G6ETWdEnN3+Mh06Py80kL/xgBeR4/oeEI/Oq8KLRBo11K4Wwh0TZCN+XbtrIKBnW2 9fSF62hZ56gxoEejucU6y1cXVAC+JCgvDOBNhxdnwIcioLu2833F/0WZMBViCvO8X4 Aqfck0SfxdNkrZxRztSvEEGZsd2O489JLq7NJCRw= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 99F0C3858C41 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 99F0C3858C41 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1721483889; cv=none; b=AR+AdcE0N+lOJWTWjTAClPOp0TQ8ypNrnmqwYznvemxS8NQrFbmKP7y/3eMDKsckFTaQYjYJLT0Z2M8IKlZarSepeKoNgs5GNSN+W6qxx5tO0BE1x8ltUOJVH+VZU6TP3Ocnc47zy3//fNJ07yTdADpJuKc+ivHrsPehDHawOXw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1721483889; c=relaxed/simple; bh=V/g9SczZDSYZtE85w54JnICASDSrqhWJUjr7Q2k1r1Q=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=GGAc5Q6xaVTQUEkktcUPCqiTs3rLz+NZUJebEGHLZYYYz2u8vYsueKNHiOu3RVIDedR8iefsCWiP1lkrAAztnOQUL0eRhFpzVYyDVQoAaRdij1DH9NOYLDf7GSOoBfjfIrpsuZfHx38dD2H6EYXhjT+rKW0YV3dE+0HWMgI9Hc0= ARC-Authentication-Results: i=1; server2.sourceware.org X-ASG-Debug-ID: 1721483886-24039d241b37bfa0001-w5GHUG X-Barracuda-Envelope-From: moss AT cs DOT umass DOT edu X-Barracuda-RBL-Trusted-Forwarder: 128.119.240.136 X-Barracuda-RBL-Trusted-Forwarder: 172.27.235.41 Message-ID: <57d18abd-4a77-770d-a312-036ba86ba092@cs.umass.edu> Date: Sat, 20 Jul 2024 09:58:05 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: Parse output of "net use", but language varies - force language for "net use"? Content-Language: en-US X-ASG-Orig-Subj: Re: Parse output of "net use", but language varies - force language for "net use"? To: Mark Liam Brown , cygwin AT cygwin DOT com References: In-Reply-To: X-Barracuda-Connect: mailsrv.cs.umass.edu[128.119.240.136] X-Barracuda-Start-Time: 1721483886 X-Barracuda-Encrypted: ECDHE-RSA-AES128-GCM-SHA256 X-Barracuda-URL: https://barramail.cs.umass.edu:443/cgi-mod/mark.cgi X-Barracuda-BRTS-Status: 1 X-Virus-Scanned: by bsmtpd at cs.umass.edu X-Barracuda-Scan-Msg-Size: 969 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=9.7 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.127888 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, JMQ_SPF_NEUTRAL, NICE_REPLY_A, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 List-Id: General Cygwin discussions and problem reports List-Archive: List-Post: List-Help: List-Subscribe: , From: Eliot Moss via Cygwin Reply-To: Eliot Moss Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "Cygwin" 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