X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=0.2 required=5.0 tests=AWL,BAYES_05,RCVD_NUMERIC_HELO,RP_MATCHES_RCVD,SPF_HELO_PASS,TW_YG X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: Oleksandr Gavenko Subject: 'cygcheck -f' pattern syntax. Date: Thu, 22 Sep 2011 15:10:05 +0300 Lines: 39 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2 X-IsSubscribed: yes 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 $ time cygcheck -f 'stdio.h' real 0m1.016s user 0m0.031s sys 0m0.015s $ time cygcheck -f '*stdio.h' $ time cygcheck -f '*stdio.h' $ time cygcheck -f '*stdio.h' $ time cygcheck -f /usr/include/stdio.h cygwin-1.7.9-1 real 0m0.907s user 0m0.015s sys 0m0.031s So 'cygcheck -f' does not allow 'glob' and 'regex'. I write simple script that allow use regex: #!/bin/sh regex=$(echo "$1" | sed -e 's|\\|&&|g' -e 's|=|\\=|g') for file in /etc/setup/*.lst.gz; do name=${file#/etc/setup/} name=${name%.lst.gz} gzip -d -c $file | sed -n "\=$regex={s=^=$name: /=;p;}" done But this script is extremely slow: $ time ./cygsearch.sh 'bin/emacs' emacs: /usr/bin/emacs-nox.exe emacs: /usr/bin/emacs.ico emacs: /usr/bin/emacsclient.exe emacs-X11: /usr/bin/emacs-X11.exe real 0m38.797s user 0m44.620s sys 0m25.574s -- 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