[RTEMS Project] #3328: bootstrap uses non-POSIX compliant echo -e

RTEMS trac trac at rtems.org
Fri Mar 9 19:10:16 UTC 2018


#3328: bootstrap uses non-POSIX compliant echo -e
--------------------------+---------------------
 Reporter:  Amaan Cheval  |       Owner:  (none)
     Type:  defect        |      Status:  new
 Priority:  normal        |   Milestone:
Component:  build         |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |  Blocked By:
 Blocking:                |
--------------------------+---------------------
Description changed by Joel Sherrill:

Old description:

> On certain shells, the "-e" option is not supported, and causes echo to
> output the flag along with the quoted text.
>
> {{{
>
> -> % sh
> $ echo -e "foo bar"
> -e foo bar
> $
> }}}
>
> This varies by shell, and is not even consistent between sh or bash.
>
> It was introduced [https://devel.rtems.org/ticket/3254#comment:78 while
> removing the make preinstall stage here], and may still work on most
> shells, though it didn't for me on sh on Ubuntu 16.04 LTS
> (4.4.0-78-generic x86_64 GNU/Linux) - as far as I can tell, this bug
> hasn't made it to any releases yet, so just fixing it on master should be
> enough.
>
> A patch is attached.

New description:

 On certain shells, the "-e" option is not supported, and causes echo to
 output the flag along with the quoted text.

 {{{

 -> % sh
 $ echo -e "foo bar"
 -e foo bar
 $
 }}}

 This varies by shell, and is not even consistent between sh or bash.

 It was introduced [https://devel.rtems.org/ticket/3254#comment:78 while
 removing the make preinstall stage here], and may still work on most
 shells, though it didn't for me on sh on Ubuntu 16.04 LTS
 (4.4.0-78-generic x86_64 GNU/Linux) - as far as I can tell, this bug
 hasn't made it to any releases yet, so just fixing it on master should be
 enough.

 A patch is attached.

 Reference to the POSIX standard which confirms that -n is the only
 argument supported.

 http://pubs.opengroup.org/onlinepubs/9699919799/utilities/echo.html

 Link to POSIX for printf(1):

 http://pubs.opengroup.org/onlinepubs/9699919799/utilities/printf.html

--

--
Ticket URL: <http://devel.rtems.org/ticket/3328#comment:1>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list