all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#3479: rgrep sends directories needlessly to grep
@ 2009-06-05 21:39 jidanni
  2019-10-06  4:50 ` Stefan Kangas
  2019-10-10 22:33 ` 積丹尼 Dan Jacobson
  0 siblings, 2 replies; 4+ messages in thread
From: jidanni @ 2009-06-05 21:39 UTC (permalink / raw)
  To: bug-gnu-emacs

Gentlemen, I used the same string as e.g.,
(rgrep "bla" "*" "~/mediawiki/")
produced, and instead appended fgrep, and found
$ find . \( -path \*/CVS -o -path \*/.svn -o -path \*/\{arch\} -o -path \*/.hg -o -path \*/_darcs -o -path \*/.git -o -path \*/.bzr \) -prune -o  -type f \( -name \* \)|fgrep -c .svn
62
That's right, 62 .svn's, when you thought you had eliminated them. They
are all directories.

OK, now putting the print inside ( ),
$ cd ~/mediawiki/;find  . -path \*/.svn  -prune -o \( -type f \( -name \* \) -print \)|fgrep .svn
./math/.svnignore
./tests/.svnignore
Which were put there by the staff, so we have indeed eliminated what we
need to!

Therefore consider putting your ...-print0 inside a ( )!

Also only one space is needed between "-o  -type f".

(Of course grep doesn't give an error when given a directory.)






^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#3479: rgrep sends directories needlessly to grep
  2009-06-05 21:39 bug#3479: rgrep sends directories needlessly to grep jidanni
@ 2019-10-06  4:50 ` Stefan Kangas
  2019-10-10 22:33 ` 積丹尼 Dan Jacobson
  1 sibling, 0 replies; 4+ messages in thread
From: Stefan Kangas @ 2019-10-06  4:50 UTC (permalink / raw)
  To: 積丹尼 Dan Jacobson; +Cc: 3479

jidanni@jidanni.org writes:

> Gentlemen, I used the same string as e.g.,
> (rgrep "bla" "*" "~/mediawiki/")
> produced, and instead appended fgrep, and found
> $ find . \( -path \*/CVS -o -path \*/.svn -o -path \*/\{arch\} -o -path \*/.hg -o -path \*/_darcs -o -path \*/.git -o -path \*/.bzr \) -prune -o  -type f \( -name \* \)|fgrep -c .svn
> 62
> That's right, 62 .svn's, when you thought you had eliminated them. They
> are all directories.
>
> OK, now putting the print inside ( ),
> $ cd ~/mediawiki/;find  . -path \*/.svn  -prune -o \( -type f \( -name \* \) -print \)|fgrep .svn
> ./math/.svnignore
> ./tests/.svnignore
> Which were put there by the staff, so we have indeed eliminated what we
> need to!
>
> Therefore consider putting your ...-print0 inside a ( )!

This was reported 10 years ago.  If you still remember what it's
about, could you please explain how to reproduce whatever issue this
is inside Emacs?  And what is the issue here exactly?  I'm not sure I
understand.

Thanks in advance.

Best regards,
Stefan Kangas





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#3479: rgrep sends directories needlessly to grep
  2009-06-05 21:39 bug#3479: rgrep sends directories needlessly to grep jidanni
  2019-10-06  4:50 ` Stefan Kangas
@ 2019-10-10 22:33 ` 積丹尼 Dan Jacobson
  2019-10-10 23:32   ` Stefan Kangas
  1 sibling, 1 reply; 4+ messages in thread
From: 積丹尼 Dan Jacobson @ 2019-10-10 22:33 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 3479-done

SK> This was reported 10 years ago.  If you still remember what it's
SK> about, could you please explain how to reproduce whatever issue this
SK> is inside Emacs?  And what is the issue here exactly?  I'm not sure I
SK> understand.

Hard for me to remember too. So I'll close it.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#3479: rgrep sends directories needlessly to grep
  2019-10-10 22:33 ` 積丹尼 Dan Jacobson
@ 2019-10-10 23:32   ` Stefan Kangas
  0 siblings, 0 replies; 4+ messages in thread
From: Stefan Kangas @ 2019-10-10 23:32 UTC (permalink / raw)
  To: 積丹尼 Dan Jacobson; +Cc: 3479-done

Dan Jacobson <jidanni@jidanni.org> writes:
> Hard for me to remember too. So I'll close it.

Thanks.





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-10-10 23:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-05 21:39 bug#3479: rgrep sends directories needlessly to grep jidanni
2019-10-06  4:50 ` Stefan Kangas
2019-10-10 22:33 ` 積丹尼 Dan Jacobson
2019-10-10 23:32   ` Stefan Kangas

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.