bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#32703: echo_man_error


From: Eric Blake
Subject: bug#32703: echo_man_error
Date: Tue, 11 Sep 2018 13:07:07 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0

On 9/11/18 11:01 AM, Eric Blake wrote:

$ POSIXLY_CORRECT=1 /bin/echo a\\nb
a\nb

Yikes!  Even though we asked for POSIX correctness, we are NOT interpreting backslashes.  I think this is a bug in GNU coreutils' echo, and could be fixed by the patch below (but the testsuite would also need updates).

And it might even be a regression. Reading through NEWS, I found this back in 5.3.0:

  echo now conforms to POSIX better.  It supports the \0ooo syntax for
  octal escapes, and \c now terminates printing immediately.  If
  POSIXLY_CORRECT is set and the first argument is not "-n", echo now
  outputs all option-like arguments instead of treating them as options.

although I haven't actually tested prior versions to see if behavior has changed over time.

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org





reply via email to

[Prev in Thread] Current Thread [Next in Thread]