Bug 53857 - Undocumented escape sequence
Summary: Undocumented escape sequence
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: findutils
Version: 7.1
Hardware: All
OS: Linux
medium
low
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Aaron Brown
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-09-20 01:52 UTC by Chris Watt
Modified: 2007-04-18 16:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-02-12 12:54:17 UTC
Embargoed:


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

Description Chris Watt 2001-09-20 01:52:34 UTC
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 17:15:52 UTC
I've reported this upstream.


Comment 2 Tim Waugh 2001-12-18 17:16:24 UTC
Created attachment 40947 [details]
Here is the patch I sent.

Comment 3 Tim Waugh 2002-02-13 14:08:34 UTC
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.