Article View: gnu.bash.bug
Article #295echo -n does
From: Brian Fox
Date: Mon, 10 Jul 1989 22:57
Date: Mon, 10 Jul 1989 22:57
33 lines
1338 bytes
1338 bytes
Date: Mon, 10 Jul 89 18:40:46 -0400
From: James J Dempsey <jjd@bbn.com>
I'm running bash 1.02 under Ultrix 3.0 on a VAX 8530 compiled with GCC 1.35.
The "-n" option of the builtin echo doesn't seem to suppress a newline
at the end. However, using \c with -e does seem to suppress the
newline. I couldn't figure out the problem from a quick look at the
code since -n and \c seem to do the same thing.
Yeah, sorry about that. In builtins.c, function echo_builtin (), the
segment of code reading:
while (*temp)
{
if (*temp == 'n')
display_return == 0;
#ifdef V9_ECHO
else if (*temp == 'e')
should read:
while (*temp)
{
if (*temp == 'n')
display_return = 0;
#ifdef V9_ECHO
else if (*temp == 'e')
i.e., the test "display_return == 0" should be an assignment.
brian
Technical Details
Message-ID:
<8907102257.AA00622@aurel.caltech.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!AUREL.CALTECH.EDU!bfoxReferences:
<8907102240.AA00404@life.ai.mit.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!AUREL.CALTECH.EDU!bfox From: bfox@AUREL.CALTECH.EDU (Brian Fox) Newsgroups: gnu.bash.bug Subject: echo -n does Message-ID: <8907102257.AA00622@aurel.caltech.edu> Date: 10 Jul 89 22:57:40 GMT References: <8907102240.AA00404@life.ai.mit.edu> Sender: daemon@tut.cis.ohio-state.edu Reply-To: bfox@aurel.caltech.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 33