public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: Hallvard B Furuseth <h.b.furuseth@usit.uio.no> To: gcc-gnats@gcc.gnu.org Subject: other/10270: gccbug's echo displays '-n' instead of no-line-break Date: Sun, 30 Mar 2003 13:28:00 -0000 [thread overview] Message-ID: <E18zba4-0004Mv-00@bombur.uio.no> (raw) >Number: 10270 >Category: other >Synopsis: gccbug's echo displays '-n' instead of no-line-break >Confidential: no >Severity: non-critical >Priority: low >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Sun Mar 30 12:16:00 UTC 2003 >Closed-Date: >Last-Modified: >Originator: Hallvard B Furuseth >Release: 3.2.2 >Organization: >Environment: System: SunOS bombur.uio.no 5.8 Generic_108528-13 sun4u sparc SUNW,Ultra-5_10 Architecture: sun4 host: sparc-sun-solaris2.8 build: sparc-sun-solaris2.8 target: sparc-sun-solaris2.8 configured with: ../gcc-3.2.2/configure --enable-languages=c,c++,f77 --prefix=/usit/bombur/hbf --enable-version-specific-runtime-libs --enable-threads >Description: gccbug asks '-n a)bort, e)dit or s)end?' when /bin/echo is the first echo in $PATH. >How-To-Repeat: PATH="/bin:$PATH" gccbug >Fix: Don't hard-code ECHON=bsd in gccbug, instead check for bsd vs. sysv echo at run-time: --- gccbug~ Sun Mar 30 01:15:28 2003 +++ gccbug Sun Mar 30 13:55:33 2003 @@ -56,16 +56,13 @@ PASSWD="cat /etc/passwd" -ECHON=bsd - -if [ $ECHON = bsd ] ; then - ECHON1="echo -n" - ECHON2= -elif [ $ECHON = sysv ] ; then - ECHON1=echo - ECHON2='\c' -else - ECHON1=echo - ECHON2= -fi +ECHON1="echo -n" +ECHON2='\c' +case `$ECHON1 "foo $ECHON2"` in + -n*c) ECHON1=echo + ECHON2= + ;; + -n*) ECHON1=echo ;; + *) ECHON2= ;; +esac #\f >Release-Note: >Audit-Trail: >Unformatted:
reply other threads:[~2003-03-30 12:16 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=E18zba4-0004Mv-00@bombur.uio.no \ --to=h.b.furuseth@usit.uio.no \ --cc=gcc-gnats@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).