Bug 80319 - Output without newline is overwritten by bash prompt
Summary: Output without newline is overwritten by bash prompt
Status: CLOSED DUPLICATE of bug 74383
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: bash
Version: 8.0
Hardware: i686
OS: Linux
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Ben Levenson
Depends On:
TreeView+ depends on / blocked
Reported: 2002-12-24 11:36 UTC by Andrew Hadinyoto
Modified: 2007-04-18 16:49 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2006-02-21 18:50:32 UTC

Attachments (Terms of Use)

Description Andrew Hadinyoto 2002-12-24 11:36:44 UTC
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 12:52:09 UTC

*** This bug has been marked as a duplicate of 74383 ***

Comment 2 Red Hat Bugzilla 2006-02-21 18:50:32 UTC
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.