Path: 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 Date: Mon, 10 Jul 89 18:40:46 -0400 From: James J Dempsey 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