Bug 80319 - Output without newline is overwritten by bash prompt
Output without newline is overwritten by bash prompt
Status: CLOSED DUPLICATE of bug 74383
Product: Red Hat Linux
Classification: Retired
Component: bash (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2002-12-24 06:36 EST by Andrew Hadinyoto
Modified: 2007-04-18 12:49 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-02-21 13:50:32 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Andrew Hadinyoto 2002-12-24 06:36:44 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2.1) Gecko/20021130

Description of problem:
Bash's prompt overwrites output that's printed without newline. For example if
you enter: echo -n "hello", no output will be seen. The output is printed but it
was overwritten by bash's prompt.

On long output, the bug is more obvious:
echo -n "this is a very very long output without newline"
The results show
[uname@hostname tmp]$ ng output without newline 

The bug occured in Konsole, Gnome console and xterm. Also in runlevel 3
console under certain condition. Please see Additional Information 

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
Use runlevel 5 either KDE or Gnome
1. echo -n "hello"
2. echo -n "hello just type a long text here longer than your prompt"
3. perl -e 'print "this will also caused a bug blah blah";'


Actual Results:  
[uname@hostname tmp]$
[uname@hostname tmp]$g text here longer than your prompt
[uname@hostname tmp]$ a bug blah blah

Expected Results:  
hello[uname@hostname tmp]$
hello just type a long text here longer than your prompt[uname@hostname tmp]$
this will also caused a bug blah blah[uname@hostname tmp]$

Additional info:

I noticed this problem only occurs only on subsequent instance of bash.
It can be determined by $SHLVL variable. If it is "1", the bug does not
happen. If it is greater than "1" which for Konsole, xterm, and Gnome
Console by default are "3" when opened from X Windows.

Remote login using SSH is fine, but when you "su -", the bug occured.
Runlevel 3 console login is fine, but when you "su -" or call "bash"
again, the bug occured. Again, it's fine as long as SHLVL is "1".
Comment 1 Tim Waugh 2002-12-24 07:52:09 EST

*** This bug has been marked as a duplicate of 74383 ***
Comment 2 Red Hat Bugzilla 2006-02-21 13:50:32 EST
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.

Note You need to log in before you can comment on or make changes to this bug.