Bug 591492
Summary: | builtin echo -e does not handle \nnn octal escape unless its first digit is 0 | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Denys Vlasenko <dvlasenk> |
Component: | bash | Assignee: | Roman Rakus <rrakus> |
Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | medium | Docs Contact: | |
Priority: | low | ||
Version: | rawhide | CC: | ovasik, rrakus, tsmetana |
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: | 2010-07-01 12:50:37 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
Denys Vlasenko
2010-05-12 12:10:34 UTC
So the bogus is echo from coreutils. See http://www.opengroup.org/onlinepubs/009695399/utilities/echo.html Also, bash's echo works as documented - see man page of echo builtin. On bash 3.1.17(1) builtin echo does: $ echo -e '\44' $ GNU coreutils echo always supported \NNN format for octal character - it did not supported \0NNN until http://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=97a6ce40ed4a34c9fb5eba5b50572f81bb839930 . This is documented in `info echo invocation` documentation. However - that's nonstandard thing, so bash builtin echo could choose to support only \0NNN octal format. It was changed between 3.1 and 3.2 by http://git.savannah.gnu.org/cgit/bash.git/diff/builtins/echo.def?id=0628567a28f3510f506ae46cb9b24b73a6d2dc5d for reference ... (In reply to comment #1) > So the bogus is echo from coreutils. See > http://www.opengroup.org/onlinepubs/009695399/utilities/echo.html > Also, bash's echo works as documented - see man page of echo builtin. It's not like bash echo builtin does not support something on top of Open Group Base Specification. For example, that page doesn't document \e too, but \e works. Nevertheless, bash works as documented and there's not any rule to handle \nnn in echo. Use printf instead - what is recommend... |