X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:reply-to:subject:references:to:from:message-id :date:mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=krztDZUsMb1HlJj5 5RDLHJq4603k94qy4AdlOXnnbYRVYbvPWVeHUe9sGI9I18d2e31RXIdkAiBGBkPK aFicQ7EokEbW2qSczNfRspv3BRJUduVzMxoZSdTGgzIqcZeLK+0mUVKdFBhNJQv0 4TA3LDl5n3ojfY14YMlJFxq6VV8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:reply-to:subject:references:to:from:message-id :date:mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=OMP6T9aTvYdRJMh4lQrT3w ZTqGw=; b=NtX86NSY2DMzFqcyaXNnabpfx3rG7kl+DLWTg96ZmWskOC/LVggbnl HoY9Gizji1e5rdAu2xV4J4xSMEQJCYYRg3OOFDv5ZzdTfAp21Ew41vkKxcTFFDfb PFhhRXPxMmvYIStKKrBehZ//nL0sUwGj7eXej5cK+PWuK1xsLAQM4= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL,BAYES_50,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=calgary, Alberta, alberta, Calgary X-HELO: smtp-out-no.shaw.ca X-Authority-Analysis: v=2.2 cv=BNTDlBYG c=1 sm=1 tr=0 a=WqCeCkldcEjBO3QZneQsCg==:117 a=WqCeCkldcEjBO3QZneQsCg==:17 a=vsAZ4HiF_gUA:10 a=IkcTkHD0fZMA:10 a=lq09YCyhELUA:10 a=0a-MxDs-DqgJ-4PeFYMA:9 a=QEXdDO2ut3YA:10 Reply-To: Brian DOT Inglis AT Shaw DOT ca Subject: Re: cygcheck and literal plus sign References: <588c8cc9 DOT a5249d0a DOT d8d5b DOT 49c2 AT mx DOT google DOT com> <8ce40df2-0a8f-4128-9107-ea2f16ec7fca AT redhat DOT com> To: cygwin AT cygwin DOT com From: Brian Inglis Message-ID: <492085c7-09c5-0c5b-8b6b-02f38a8df9a5@Shaw.ca> Date: Sat, 28 Jan 2017 12:59:12 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <8ce40df2-0a8f-4128-9107-ea2f16ec7fca@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfNnoI7JWi2dauxyqLHb4OWX+TPU/0CFgCkreT3ll4t5xtB0dT+uTit7eeLtnuxC3vfUy26Pytl8T5UGtJiqsunWX7tmjSr1GLEx7zO28xwCdlBbHJ9S/ ja4QEJJM/M1tsiWpRR6pct+tfLj3G9ouDrwGtTqzP7RJ77BZ3OOj1yHH On 2017-01-28 12:06, Eric Blake wrote: > On 01/28/2017 11:45 AM, Brian Inglis wrote: >>> it did put me on the right track: >>> $ cygcheck -p 'mingw32-g[:punct:][:punct:]' | awk 'NR>1{$0=$1}1' >> Your command is the same as: >> $ cygcheck -p mingw32-g[:ctnpu][:ctnpu] | sed '2,$s/\s.*//' > Not necessarily. You forgot quotes, so depending on what is in your > current directory, that glob might expand. The point was that in any case it was not doing what was wanted nor expected, and an extra set of brackets [[:punct:]] are needed to search for punctuation. >> ITYM: >> $ cygcheck -p mingw32-g[[:punct:]][[:punct:]] | sed '2,$s/\s.*//' Not sure what if anything glob does with double brackets - anything I tried with ls always returned the search string e.g. $ ls /etc/setup/[[a-z]]* ls: cannot access '/etc/setup/[[a-z]]*': No such file or directory It does not seem to have any support for accented character classes or the ilk e.g. re [[:a:][:e:][:i:][:o:][:u:]] which could be useful searching for UTF-8 filenames. > Or, with proper quoting to shield yourself from globbing based on the > contents of the current directory: > cygcheck -p 'mingw32-g[[:punct:]][[:punct:]]' | sed '2,$s/\s.*//' Always a concern for conscientious scripters and especially on Windows where characters which may rarely be encountered on Unix systems are often lurking to catch unwary scripters. -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada -- 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