Subject: Re: discrepency beteen /bin/echo and builtin echo of /bin/sh
To: NetBSD-current Discussion List <>
From: Robert Elz <kre@munnari.OZ.AU>
List: current-users
Date: 06/10/2002 22:24:51
    Date:        Sat,  8 Jun 2002 15:48:42 -0400 (EDT)
    From: (Greg A. Woods)
    Message-ID:  <>

  | I'd VERY much rather see /bin/echo and /bin/sh's built-in echo be
  | conformant with SuSv2 instead (since it provides most of the
  | capabilities of the ksh "print" builtin without any of the portability
  | headache),

But echo is not supposed to be print, it is supposed to be echo.

With echo interpreting characters anywhere in its args, there
is no sane way to do
	echo $foo
unless you know what is in foo to start with, in which case there
isn't a lot of point printing it...

It sounds as if posix is doing something right, though arguments can be
made for even getting rid of -n and simply having echo echo its args to
stdout, with no additions, subtractions, ...

Pretending that an echo that knows about '\n' is rational is irrational.


ps: echo being echo is not BSD, it is original unix, from way way back.