Bug 159098
Summary: | 's' command doesn't work with '|' delimiter and '\|' in expression | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 4 | Reporter: | Trevin Beattie <trevin> |
Component: | sed | Assignee: | Jakub Jelinek <jakub> |
Status: | CLOSED NOTABUG | QA Contact: | Ben Levenson <benl> |
Severity: | low | Docs Contact: | |
Priority: | medium | ||
Version: | 4.0 | ||
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2005-05-30 10:19:11 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Trevin Beattie
2005-05-29 16:05:20 UTC
The sed behaviour is right. When you use | as the delimiter character, | in the BRE must be escaped. Therefore, \| in BRE is literal | character and there is no way how to express \| (BRE alternation). With sed -r (where EREs are used instead of BREs), if | is used as delimiter character, \| in the ERE is ERE alternation and there is no way to express literal character | in the ERE. Perhaps man 1p sed is more descriptive about this, it says: Any backslash used to alter the default meaning of a subsequent character shall be discarded from the BRE or the replacement before evaluating the BRE or using the replacement. |