[Bug 259671] Re: dash: echo builtin interprets backslash escape sequences

a7x 259671 at bugs.launchpad.net
Sat Jun 29 20:38:53 UTC 2013


This is not a bug --
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/echo.html says
that echo should process the backslashes.  It would be a bug if echo did
not process the backslashes.

If you don't want backslashes processed, use printf:

    printf %s\\n '\\'

** Changed in: dash (Ubuntu)
       Status: Confirmed => Invalid

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to dash in Ubuntu.
https://bugs.launchpad.net/bugs/259671

Title:
  dash: echo builtin interprets backslash escape sequences

Status in Bourne Again Shell:
  Invalid
Status in “dash” package in Ubuntu:
  Invalid
Status in “dash” package in Debian:
  Won't Fix

Bug description:
  In dash, backslashes are parsed within single quotes, contradicting POSIX and it's own man page.
  POSIX: http://www.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_02_02

  The following should print 2 backslashes:
  echo '\\'

To manage notifications about this bug go to:
https://bugs.launchpad.net/bash/+bug/259671/+subscriptions




More information about the foundations-bugs mailing list