delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-2.7 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE |
X-Spam-Check-By: | sourceware.org |
MIME-Version: | 1.0 |
In-Reply-To: | <4FC7AF0C.2060103@dyximaq.de> |
References: | <CANs8wdCCMC6R5Pzye67KJ2Oie728J7eq52kXd1Mh56Bn5ivS+Q AT mail DOT gmail DOT com> <CANs8wdAu05j3ayXE=oNqOb4seRb4ogEyCMq+4eKC+rk5G9g9FA AT mail DOT gmail DOT com> <4FC76383 DOT 4030607 AT redhat DOT com> <CANs8wdAxczSi5cp_49u4FPY+UqmssvUXv=+UMTDARi0yRDX8qw AT mail DOT gmail DOT com> <4FC7AF0C DOT 2060103 AT dyximaq DOT de> |
Date: | Thu, 31 May 2012 20:44:19 +0200 |
Message-ID: | <CANs8wdDjfzd_Hp3YjfvoZC6JQ0okinbXGyfK06+9DZECM6DTkg@mail.gmail.com> |
Subject: | Re: [cron-config] Possible issue with administrators group ? |
From: | AZ 9901 <az9901 AT gmail DOT com> |
To: | cygwin AT cygwin DOT com |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
2012/5/31 Dirk Sondermann : > On 31.05.2012 15:45, AZ 9901 wrote: >> 2012/5/31 Eric Blake <eblake AT redhat DOT com>: >>> On 05/31/2012 05:18 AM, AZ 9901 wrote: >>>> 2012/5/29 AZ 9901 : >>>>> Hello, >>>>> >>>>> I am looking at the /bin/cron-config script. >>>>> >>>>> Line 627, we can find : >>>>> elif net localgroup "${_admingroup}" | grep -Eiq "^${username}.?$"; then >>>>> >>>>> Why .? at the end of the regexp ? "^${username}.?$" >>> >>> Because 'net' outputs in DOS mode, with carriage returns at the end. >> >> OK, I was also thinking about this (talking about buggy output) but I >> was not sure. >> Strange that using grep -iq "^${username}$" works fine (well, I just >> tested this on my XP). > > This works because the current version of grep (2.6.3-1) doesn't treat > its input as binary by default, but strips the carriage returns from > the output of net localgroup. So grep -iq "^${username}$" matches, but > grep --binary -iq "^${username}$" doesn't. > >> Do Windows tools output in DOS mode "when they want" ? > > No, od -c shows the \r\n endings in the output of net localgroup. > Thank you very much for this explanation, it makes sense ! So perhaps maintainer of cron package could update the regexp to avoid the little possible issue :-) -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |