From owner-freebsd-current Tue Sep 15 10:33:17 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA21162 for freebsd-current-outgoing; Tue, 15 Sep 1998 10:33:17 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from ganymede.or.intel.com (ganymede.or.intel.com [134.134.248.3]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA21157 for ; Tue, 15 Sep 1998 10:33:15 -0700 (PDT) (envelope-from jmoss@ichips.intel.com) Received: from ichips-ra.pdx.intel.com (ichips-ra.pdx.intel.com [137.102.192.31]) by ganymede.or.intel.com (8.8.6/8.8.5) with ESMTP id RAA04575; Tue, 15 Sep 1998 17:31:44 GMT Received: from pdxss086 (pdxss086.pdx.intel.com [137.102.200.41]) by ichips-ra.pdx.intel.com (8.8.8/8.8.7) with SMTP id KAA11912; Tue, 15 Sep 1998 10:31:44 -0700 (PDT) Received: from localhost by pdxss086 (SMI-8.6/WW2.2 (Ronler Acres)) id KAA18379; Tue, 15 Sep 1998 10:31:44 -0700 Message-Id: <199809151731.KAA18379@pdxss086> X-Mailer: exmh version 2.0.2-97r1.3 7/23/98 To: Martin Cracauer cc: chet@po.cwru.edu, crossd@cs.rpi.edu, freebsd-current@FreeBSD.ORG Subject: Re: 'bug' in /bin/sh's builtin 'echo' In-reply-to: Your message of "Tue, 15 Sep 1998 17:57:55 +0200." <19980915175755.A6907@cons.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 15 Sep 1998 10:31:44 -0700 From: Joe Moss Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > In <980915154036.AA11163.SM@nike.ins.cwru.edu>, Chet Ramey wrote: > > > Also, what happens if \c isn't at the end of the string? The -n > > > construct seems superiour to me. > > > > Everything after the \c should be ignored. > > > > > Anyway, please file a PR about this. I'll take care of it when my > > > Posix documents arrive, which should be in time for the 3.0 release. > > > > POSIX.2 says very little about `echo'; it recommends using printf(1) > > instead. It defines nothing, and allows everything. Specifically, > > arguments which contain a backslash, or a first argument of `-n', > > are `implementation defined'. > > I was afraid that would be the case. So much for wasting money on > standard documents :-) You just have to pick the right standards :-) "The Single UNIX Specification, Version 2" does talk about echo and '\c' vs. '-n'. See http://www.opengroup.org/onlinepubs/7908799/xcu/echo.html > > We obviously should unify /bin/sh's echo and /bin/echo. I vote to > unify on displaying \c verbatim when -e isn't set, for the reasons I > stated in my previous mail. > > Since bash doesn't recognize \c as special without -e either, I think > compatiblity to other platforms is equivalent (bad) for both > solutions. If anything, I would rate Linux compatiblity to be > slightly more important since we run Linux binaries as well. > > Martin > -- > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > Martin Cracauer http://www.cons.org/cracauer > Tel.: (private) +4940 5221829 Fax.: (private) +4940 5228536 > Paper: (private) Waldstrasse 200, 22846 Norderstedt, Germany > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-current" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message