Red Hat Bugzilla – Bug 169608
sed doesnt handle octal constants correctly
Last modified: 2007-11-30 17:11:14 EST
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):
Steps to Reproduce:
1.run: sed 's/\047//g'
Actual Results: shdasjgsds'asdasdhjsahd
Expected Results: shdasjgsdsasdasdhjsahd
However, the following works as expected:
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!
Please read sed documentation, especially:
GNU Extensions for Escapes in Regular Expressions
\x27 is a GNU sed extension, and so is \o047.