From owner-freebsd-current Tue Sep 15 08:58:47 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id IAA02899 for freebsd-current-outgoing; Tue, 15 Sep 1998 08:58:47 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from cons.org (knight.cons.org [194.233.237.86]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id IAA02889 for ; Tue, 15 Sep 1998 08:58:42 -0700 (PDT) (envelope-from cracauer@cons.org) Received: (from cracauer@localhost) by cons.org (8.8.8/8.7.3) id RAA06921; Tue, 15 Sep 1998 17:57:55 +0200 (CEST) Message-ID: <19980915175755.A6907@cons.org> Date: Tue, 15 Sep 1998 17:57:55 +0200 From: Martin Cracauer To: chet@po.cwru.edu, cracauer@cons.org Cc: crossd@cs.rpi.edu, freebsd-current@FreeBSD.ORG Subject: Re: 'bug' in /bin/sh's builtin 'echo' References: <19980915162741.A7479@cons.org> <980915154036.AA11163.SM@nike.ins.cwru.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.93.1i In-Reply-To: <980915154036.AA11163.SM@nike.ins.cwru.edu>; from Chet Ramey on Tue, Sep 15, 1998 at 11:40:36AM -0400 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 :-) 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