Bug 169608 - sed doesnt handle octal constants correctly
Summary: sed doesnt handle octal constants correctly
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: sed
Version: 4
Hardware: i386
OS: Linux
medium
high
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Ben Levenson
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-09-30 07:39 UTC by JW
Modified: 2007-11-30 22:11 UTC (History)
0 users

(edit)
Clone Of:
(edit)
Last Closed: 2005-09-30 08:03:41 UTC


Attachments (Terms of Use)

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):
sed-4.1.4

How reproducible:
Always

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

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
page.
\x27 is a GNU sed extension, and so is \o047.


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