bug-coreutils
[Top][All Lists]
Advanced

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

bug#10620: Improper handling of newline characters


From: Philippe Grégoire
Subject: bug#10620: Improper handling of newline characters
Date: Thu, 26 Jan 2012 23:16:04 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.16) Gecko/20111110 Iceowl/1.0b1 Icedove/3.0.11

Hi,

I am using GNU coreutils 8.5 (I know it is not the newest, thanks
Debian) and found an issue regarding the handling of newline characters.

If I type the command '/usr/bin/printf "hi\b"', the result is as
expected -- "h" without a newline character. However, if I type
'/usr/bin/printf "hi\b\n"', the result is "hi" followed by a newline.
The newline character seems to force a buffer flush without respecting
what precedes it. The behavior is the same no matter what precedes the
backspace character and the number of backspace characters -- try "a\b\b\n".

Now testing the same strings using the C version of printf (libc6
2.11.2), I get the same result. As such, I am wondering if it is the
result of a bug in the terminal driver; sorry to bother, I discovered it
using. I tested with bash, dash, konsole, xterm and a linux console with
the same results.

By the way, I get the same behavior using "/bin/echo -e" with and
without the -n flag".


Thank you for your work!

Philippe





reply via email to

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