From: filebat Mark <filebat.mark@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: When grep-find, show the count of matches
Date: Mon, 28 Jun 2010 21:23:07 +0800 [thread overview]
Message-ID: <AANLkTilk-uqgzKFaTAaJwV7YWMeZs652p2EfEtjHfK_5@mail.gmail.com> (raw)
In-Reply-To: <m3zkyfbdd1.fsf@passepartout.tim-landscheidt.de>
[-- Attachment #1: Type: text/plain, Size: 1627 bytes --]
Hi Tim
Your commands can help to count the matches, however my point is to get both
the matches and the count of how many matches. ^-^
Regards,
Denny
On 6/28/10, Tim Landscheidt <tim@tim-landscheidt.de> wrote:
>
> filebat Mark <filebat.mark@gmail.com> wrote:
>
> > I am wondering how to show the count of matches when grep-find. Like the
> > following.
> > ,-----------
> > | -*- mode: grep; default-directory:
> > "d:/ntemacs23/myemacs/private_data/out_of_svn/" -*-
> > | Grep started at Mon Jun 28 17:46:18
> > |
> > | find . -name ".svn" -prune -o -type f -print0 | xargs -0 -e grep -inH
> -e
> > emacs
> > | ./#tmp.txt#:7:#+TAGS: ARCHIVE(a) WEBPAGE(w) LIFE(l) EMACS(e)
> IMPORTANT(i)
> > HARD(h) COMPUTER(c) RECOMMENDATE(r) Tool(t)
> > | ./#tmp.txt#:47438:* TODO log4j-mode in emacs
> > | ./#tmp.txt#:47529:Hi emacsers
> > | ./tmp.html:554:<p class="creator">HTML generated by org-mode 6.35i in
> > emacs 23</p>
> > | ./tmp.html~:153:<p class="creator">HTML generated by org-mode 6.35i in
> > emacs 23</p>
> > | ./tmp.txt:7:#+TAGS: ARCHIVE(a) WEBPAGE(w) LIFE(l) EMACS(e) IMPORTANT(i)
> > HARD(h) COMPUTER(c) RECOMMENDATE(r) Tool(t)
> > | ./tmp.txt:47438:* TODO log4j-mode in emacs
> > |
> > | Grep finished (7 matches found) at Mon Jun 28 17:46:20
> > `-----------
>
> > IMHO, one feasible way may be counting the output of *grep* buffer.
> > Before moving any further, I am very willing to hear your ideas, comment
> or
> > codesnipet for this?
>
>
> - "find ... | xargs -0r grep ... | wc -l"?
> - "find ... | xargs -0r cat | grep -c"?
> - Read "(7 matches found)"?
>
>
> Tim
>
>
>
--
Thanks & Regards
Denny Zhang
[-- Attachment #2: Type: text/html, Size: 2267 bytes --]
next prev parent reply other threads:[~2010-06-28 13:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-28 9:59 When grep-find, show the count of matches filebat Mark
2010-06-28 11:33 ` Tim Landscheidt
2010-06-28 13:23 ` filebat Mark [this message]
2010-06-28 13:51 ` Tim Landscheidt
2010-06-28 15:57 ` filebat Mark
2010-06-28 17:59 ` Tim Landscheidt
2010-06-29 5:04 ` Kevin Rodgers
[not found] ` <mailman.1.1277747970.703.help-gnu-emacs@gnu.org>
2010-06-28 18:40 ` Andreas Politz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AANLkTilk-uqgzKFaTAaJwV7YWMeZs652p2EfEtjHfK_5@mail.gmail.com \
--to=filebat.mark@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).