Bug 169608 - sed doesnt handle octal constants correctly
sed doesnt handle octal constants correctly
Product: Fedora
Classification: Fedora
Component: sed (Show other bugs)
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Jakub Jelinek
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2005-09-30 03:39 EDT by JW
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-09-30 04:03:41 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description JW 2005-09-30 03:39:06 EDT
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 04:03:41 EDT
Please read sed documentation, especially:
GNU Extensions for Escapes in Regular Expressions
\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.