$ 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

Reply via email to