[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [PATCH] latest ash has broken 'echo' command



* Herbert Xu said:
> On Thu, Oct 21, 1999 at 09:39:00PM +0200, Sven Rudolph wrote:
> > 
> > Did we decide to follow Single Unix Specification. I thought we were
> > on POSIX, and my draft allows -n (implementation defined).
> 
> If it's implementation defined that means echo is also allowed to not support
> any options at all.  So if you were going to write a script that should work
> on all POSIX compliant shells, you must not use options and escape codes.
That's about a *script*, we're talking about the *shell* which is supposed
to provide every capability in the standard. This means the echo command
should support both arguments. Whether the script programmer uses them or
not - it's his problem, shell should support it.
 
> > The Single Unix Specification explicitely forbids BSD heritage while
> > it standardises the SYSV way.
> 
> Not really, unless POSIX enforces the options and escape codes, there is
> no way to use them portably.  So printf is still the way to go for escape
> codes and -n.
Still, what I said above applies here. Supporting the params in the shell's
builtin is NOT breaking the standard or making the shell non-portable. Shell
itself doesn't use the builtin, the scripts do. And scripts are written by
people who make decisions whether their script is to be portable or not.
 
marek

Attachment: pgp4eEXms_rfQ.pgp
Description: PGP signature


Reply to: