GNU bug report logs -
#3479
rgrep sends directories needlessly to grep
Previous Next
Reported by: jidanni <at> jidanni.org
Date: Sat, 6 Jun 2009 05:25:04 UTC
Severity: minor
Done: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 3479 in the body.
You can then email your comments to 3479 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#3479
; Package
emacs
.
(Sat, 06 Jun 2009 05:25:05 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
jidanni <at> jidanni.org
:
New bug report received and forwarded. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Sat, 06 Jun 2009 05:25:05 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
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.)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#3479
; Package
emacs
.
(Sun, 06 Oct 2019 04:51:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 3479 <at> debbugs.gnu.org (full text, mbox):
jidanni <at> 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
Reply sent
to
積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
:
You have taken responsibility.
(Thu, 10 Oct 2019 23:26:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
jidanni <at> jidanni.org
:
bug acknowledged by developer.
(Thu, 10 Oct 2019 23:26:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 3479-done <at> debbugs.gnu.org (full text, mbox):
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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#3479
; Package
emacs
.
(Thu, 10 Oct 2019 23:33:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 3479-done <at> debbugs.gnu.org (full text, mbox):
Dan Jacobson <jidanni <at> jidanni.org> writes:
> Hard for me to remember too. So I'll close it.
Thanks.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 08 Nov 2019 12:24:08 GMT)
Full text and
rfc822 format available.
This bug report was last modified 4 years and 170 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.