Subject: Re: which echo.c would you choose?
To: None <>
From: Christos Zoulas <>
List: current-users
Date: 11/30/1999 14:43:39
In article <Pine.NEB.4.10.9911300304260.6081-100000@handy.localnet>,
Frederick Bruckman <> wrote:
>The Single Unix Spec (which, as you may already know, is available
>online once you register: <>),
>says "echo" shouldn't support _any_ options, including '--'. '--'
>should be recognized as a string operand, and '\c' is used to suppress
>the newline.

Since I did a lot of research on that before (to make tcsh work properly
on all OS's):

There are 2 flavors of echo:

BSD:	uses -n to suppress new lines, does not parse \ooo or \{a,e,t,n...}
SYSV:	uses \c to suppress new lines, parses ....

So if you recognize \c you *must* parse the \ escaped characters.
And if you recognize -n you *should* not parse the \ escaped characters.

At least if you don't want to surprise programs that expect the standard