Red Hat Bugzilla – Bug 53857
Undocumented escape sequence
Last modified: 2007-04-18 12:37:15 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.78 [en] (Win98; U)
Description of problem:
Find manual lists escape sequences for -printf _not_ including "\0" or any
reference to an escape in the form \<number>, and states:
"A `\' character followed by any other character is treated as an
ordinary character, so they both are printed."
In reality a "\0" fed to find at a command line does not (as it should)
produce the text "\0" in the printed output. Instead it produces an ASCII
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1.find . -type f -printf "\"%p\"\0"
Actual Results: Find outputs a list of filenames each terminated with an
ASCII null character. This is easily verified by:
find . -type f -printf "\"%p\"\0" | tr "\0" "N"
Expected Results: Find should (according to the docs) output a list of
filenames each terminated with a literal "\0" string.
This is more of an undocumented feature really than a bug. Actually it
will come in handy if it's consistant accross versions/platforms.
I've reported this upstream.
Created attachment 40947 [details]
Here is the patch I sent.
No response from maintainer. Oh well, patch applied in findutils-4.1.7-3.