GNU bug report logs - #28334
A gnu extension for gnu grep

Previous Next

Package: grep;

Reported by: Camion SPAM <camion_spam-gnubugs <at> yahoo.fr>

Date: Sun, 3 Sep 2017 00:50:01 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

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 28334 in the body.
You can then email your comments to 28334 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-grep <at> gnu.org:
bug#28334; Package grep. (Sun, 03 Sep 2017 00:50:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Camion SPAM <camion_spam-gnubugs <at> yahoo.fr>:
New bug report received and forwarded. Copy sent to bug-grep <at> gnu.org. (Sun, 03 Sep 2017 00:50:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Camion SPAM <camion_spam-gnubugs <at> yahoo.fr>
To: "bug-grep <at> gnu.org" <bug-grep <at> gnu.org>
Subject: A gnu extension for gnu grep
Date: Sun, 3 Sep 2017 00:47:16 +0000 (UTC)
[Message part 1 (text/plain, inline)]
Hello, 
for the use with xargs -0, gnu find has a -print0 option allowing the user to process files even having the <LF> character in their name. however, in one wants to make à check on the content, this doesn't work anymore : One can write find <DIR> <CONDITIONS> -print0 | xargs -0 grep -l <REGEXP> | tr '\n' '\0' | xargs -0 ...to have de second xargs allows files with <SP> or other special characters in their names, but this won't work with files with <LF> in their name.
For this reason, I suggest we add a gnu --print0 option to grep (to be used with -l) which will separate the filenames produced with grep -l, with <NULL> characters instead of <LF> characters, in order to allow the correct processing of files with a <LF> in their names.

One might object that making a file with an <LF> character in it's name is stupid, but it is always possible to create one by mistake, juste with a wrong quote matching in shell commands or scripts.
Best regards, 
Camion
[Message part 2 (text/html, inline)]

Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Sun, 03 Sep 2017 01:41:02 GMT) Full text and rfc822 format available.

Notification sent to Camion SPAM <camion_spam-gnubugs <at> yahoo.fr>:
bug acknowledged by developer. (Sun, 03 Sep 2017 01:41:02 GMT) Full text and rfc822 format available.

Message #10 received at 28334-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Camion SPAM <camion_spam-gnubugs <at> yahoo.fr>, 28334-done <at> debbugs.gnu.org
Subject: Re: bug#28334: A gnu extension for gnu grep
Date: Sat, 2 Sep 2017 18:40:40 -0700
It sounds like grep -Z does what you want, so I'm boldly closing this 
bug report.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 01 Oct 2017 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 264 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.