emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#28334: closed (A gnu extension for gnu grep)


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#28334: closed (A gnu extension for gnu grep)
Date: Sun, 03 Sep 2017 01:41:02 +0000

Your message dated Sat, 2 Sep 2017 18:40:40 -0700
with message-id <address@hidden>
and subject line Re: bug#28334: A gnu extension for gnu grep
has caused the debbugs.gnu.org bug report #28334,
regarding A gnu extension for gnu grep
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
28334: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=28334
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: A gnu extension for gnu grep Date: Sun, 3 Sep 2017 00:47:16 +0000 (UTC)
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

--- End Message ---
--- Begin Message --- Subject: Re: bug#28334: A gnu extension for gnu grep Date: Sat, 2 Sep 2017 18:40:40 -0700 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 It sounds like grep -Z does what you want, so I'm boldly closing this bug report.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]