Bug 169608

Summary: sed doesnt handle octal constants correctly
Product: [Fedora] Fedora Reporter: JW <ohtmvyyn>
Component: sedAssignee: Jakub Jelinek <jakub>
Status: CLOSED NOTABUG QA Contact: Ben Levenson <benl>
Severity: high Docs Contact:
Priority: medium    
Version: 4   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-09-30 08:03:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description JW 2005-09-30 07:39:06 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (compatible; MSIE 6.0; Windows; U; AIIEEEE!; Win98; Windows 98; en-US; Gecko masquerading as IE; should it matter?; rv:1.8b) Gecko/20050217

Description of problem:
sed doesnt interpret octal constants correctly

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

How reproducible:

Steps to Reproduce:
1.run: sed 's/\047//g'
2.type: shdasjgsds'asdasdhjsahd

Actual Results:  shdasjgsds'asdasdhjsahd

Expected Results:  shdasjgsdsasdasdhjsahd

Additional info:

However, the following works as expected:
   sed 's/\x27//g'

I wouldn't expect that octal constants would have been deprecated because the cost to implement them correctly is zero.  After all, IP addresses can use octal!

Comment 1 Jakub Jelinek 2005-09-30 08:03:41 UTC
Please read sed documentation, especially:
GNU Extensions for Escapes in Regular Expressions
\x27 is a GNU sed extension, and so is \o047.