Bug 80319

Summary: Output without newline is overwritten by bash prompt
Product: [Retired] Red Hat Linux Reporter: Andrew Hadinyoto <ahadinyoto>
Component: bashAssignee: Tim Waugh <twaugh>
Status: CLOSED DUPLICATE QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-02-21 18:50:32 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

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.