Bug 53857 - Undocumented escape sequence
Undocumented escape sequence
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: findutils (Show other bugs)
7.1
All Linux
medium Severity low
: ---
: ---
Assigned To: Tim Waugh
Aaron Brown
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-09-19 21:52 EDT by Chris Watt
Modified: 2007-04-18 12:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-02-12 07:54:17 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Here is the patch I sent. (721 bytes, patch)
2001-12-18 12:16 EST, Tim Waugh
no flags Details | Diff

  None (edit)
Description Chris Watt 2001-09-19 21:52:34 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 
null character.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.find . -type f -printf "\"%p\"\0"
2.
3.
	

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.

Additional info:

This is more of an undocumented feature really than a bug. Actually it 
will come in handy if it's consistant accross versions/platforms.
Comment 1 Tim Waugh 2001-12-18 12:15:52 EST
I've reported this upstream.
Comment 2 Tim Waugh 2001-12-18 12:16:24 EST
Created attachment 40947 [details]
Here is the patch I sent.
Comment 3 Tim Waugh 2002-02-13 09:08:34 EST
No response from maintainer.  Oh well, patch applied in findutils-4.1.7-3.

Note You need to log in before you can comment on or make changes to this bug.